Repository navigation
feat(categories): add 'Add on top of mine' option to import dialog - #1071
Conversation
|
…dialog
When importing a named category set ({id, categories}), show a modal asking
whether to replace the current primary set (existing behaviour) or layer the
imported set on top via setActiveSets. The second path adds the imported set
to category_sets and appends it to active_set_ids without touching the primary.
Follow-up to ActivityWatch#1027 (category-set layering).
- CategorizationSettings: show import-mode modal; onImportReplace / onImportAddOnTop methods
- en.ts: importSetTitle / importSetPrompt / importReplace / importAddOnTop keys
- categories.test.node.ts: 3 tests for the add-on-top store path
Git-Session-Id: cb77
9a51076 to
95fcb8f
Compare
Git-Session-Id: 9fd4b778-2238-5ab0-abd8-36b5834c14f7
|
The active-set import finding is fixed in 2694033 and its review thread is resolved (27 targeted tests passed in the fix session). On that head, lint and CodeQL have passed; the five build/test checks are still queued, with no reported failures. No additional code change or review retrigger made. Bob cannot self-merge this repository (pull-only access); final review and merge remain with a maintainer once CI completes. |
🤖 AI code reviewThis PR adds an 'Add on top of mine' option to the category-set import dialog. It introduces a modal in CategorizationSettings.vue that asks the user how to apply a named imported set, with onImportReplace() preserving the old replace behavior and onImportAddOnTop() calling a new store action importSetOnTop(). The store action syncs local edits, handles primary-ID collisions by appending '-imported', and appends the imported set to active_set_ids. New tests cover the add-on-top path in both the component and store test files. Safe to merge — no P0/P1 findingsConfidence 5/5 ✅ No findings. The diff looks correct to me on this pass. Files changed (5) — the diff as I read it
Previous review passes
Reviewed Maintainer commands
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1071 +/- ##
==========================================
- Coverage 64.58% 64.58% -0.01%
==========================================
Files 55 55
Lines 3803 3834 +31
Branches 907 911 +4
==========================================
+ Hits 2456 2476 +20
- Misses 1332 1343 +11
Partials 15 15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Upstream highlights: - feat: custom date range period (ActivityWatch#1005) - feat: device selection (all / subset) in Activity view (ActivityWatch#1004) - feat: category rule priority (ActivityWatch#968) - feat: layered category sets (ActivityWatch#1027, ActivityWatch#1072) - feat: always show Year period (ActivityWatch#1003) - feat: AI summary privacy filter (ActivityWatch#948) - feat: 'Add on top of mine' import option (ActivityWatch#1071) - fix: multidevice queries use real bucket IDs (ActivityWatch#969, ActivityWatch#1068) - fix: timeline hourly bar Y-axis >1h (ActivityWatch#1021) - fix: CSV streaming export (ActivityWatch#993, ActivityWatch#997) - fix: Android browser data display (ActivityWatch#1069) - fix: various mobile/dark-mode/layout improvements Conflict resolution: took upstream for activity.ts (major refactor), multidevice.ts (Android support), Activity.vue, TimelineBarChart.vue, summary.ts. Re-applied our fixes on top: - query_active_history: bucket_sig cache clearing + per-event interval union (dead-watcher marathon immunity) - query_active_history_multidevice: bucket_sig + period-length cap - Removed useMultidevice references (upstream removed the setting in favour of device-selection UI); our code paths now always aggregate across all hosts
Deferred follow-up from #1027 (category-set layering, merged 2026-10-07).
When importing a named category set (
{id, categories}), the dialog now askshow to apply it:
category_setsand addsit to
active_set_idsbehind the primary set viasetActiveSets()The import path for unnamed exports (bare
{categories}blobs) is unchanged.Changes
CategorizationSettings.vue: extract named-set import into a two-optionmodal (
showImportModal);onImportReplace()carries the existing logic,onImportAddOnTop()callssetActiveSets([primaryId, setId])en.ts: four new keys (importSetTitle,importSetPrompt,importReplace,importAddOnTop)categories.test.node.ts: 3 store-level tests for the add-on-top pathTesting