fix(activity): hide unsupported visualizations instead of showing warning - #919
Conversation
…ning Replace the per-devicetype view-set approach (PR ActivityWatch#903's androidViews switching) with a simpler model: keep one view layout for all devices, but hide individual visualizations that have no backing data. Changes: - SelectableVisualization: add v-if on root div so widgets with missing prerequisites disappear in view mode (still shown in edit mode, where the existing "missing data" warning remains useful) - viewsForHost: remove Android-specific branching; always return this.views. The visibility guard in SelectableVisualization handles device-type differences automatically. Benefit: visualizations appear automatically once the required watcher data is present, with no need for separate per-device view configs. Closes ActivityWatch#904
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #919 +/- ##
==========================================
+ Coverage 38.63% 38.67% +0.04%
==========================================
Files 42 42
Lines 2278 2273 -5
Branches 435 434 -1
==========================================
- Hits 880 879 -1
+ Misses 1377 1373 -4
Partials 21 21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Greptile SummaryThis PR replaces Android-specific view selection with prerequisite-based visualization visibility.
Confidence Score: 5/5The PR appears safe to merge, with unsupported widgets consistently filtered by their existing prerequisite metadata. The unified layout preserves supported Android visualizations, hides desktop-only elements after bucket availability is established, and keeps all elements accessible during layout editing. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Render visualization] --> B{Edit mode?}
B -->|Yes| C[Show widget]
B -->|No| D{Buckets loaded?}
D -->|No| C
D -->|Yes| E{Prerequisites available?}
E -->|Yes| C
E -->|No| F[Hide widget]
Reviews (1): Last reviewed commit: "fix(activity): hide unsupported visualiz..." | Re-trigger Greptile |
|
@TimeToBuildBob but when should the user get notified about it? Will it still be hidden during edit? Should probably show then, right? |
|
Good questions — let me clarify both: Edit mode: Yes, hidden visualizations still show in edit mode. The The View mode notifications: Currently there's no explicit notification when a widget disappears — it just silently hides once buckets finish loading. The reasoning was that this is the "positive" version of the behavior (no red warning, just a clean layout with whatever's supported). But I could see the argument for a one-time toast or an info banner like "N visualizations hidden because they're not supported on this device." If you want a notification mechanism, I can add something — e.g. a dismissible info banner at the top of the view listing the hidden widget names. Or we could keep it silent as-is and rely on edit mode for discovery. What's your preference? |
|
CI-green and mergeable — waiting only on a maintainer click. This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted. |
|
@TimeToBuildBob add an option in settings to disable this hiding behavior, have it disabled by default so I can test it. |
…tions Adds `hideUnsupportedVisualizations` setting (default: false) so the hiding behavior can be tested without it being the default experience. - settings.ts: new boolean field, default false - SelectableVisualization.vue: guard short-circuits when setting is off - DeveloperSettings.vue: toggle added under Developer settings
|
Done — added How to test: go to Settings → Developer → "Hide unsupported visualizations" and toggle it on. The |
Closes #904.
What this does
Replaces the per-devicetype view-set approach from #903 (which returned hardcoded
androidViewsfor Android devices) with a simpler model: one view layout for all devices, with individual visualizations hidden when they have no backing data.Erik's direction from #904:
Changes
src/components/SelectableVisualization.vue— addv-ifon the root div:has_prerequisitesis false (no backing data for this device type), the widget disappears entirely instead of showing a warningsrc/stores/views.ts— simplifyviewsForHost:The Android-specific view selection is no longer needed — the visibility guard handles it automatically.
Behaviour
For an Android device viewed from desktop (no window buckets):
top_appsvisible,top_titleshidden, rest visibleFor the multi-device view: no change (aggregation view uses whatever's available).