Skip to content

fix(ui): dismissable multi-device note; drop synthetic category tag from search results - #1062

Merged
ErikBjare merged 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:fix/1058-minor-ui-items
Oct 6, 2026
Merged

ErikBjare merged 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:fix/1058-minor-ui-items

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Two of the "Minor" items from #1058.

  • Multi-device note — "Browser and stopwatch data are only available when viewing a single device." showed on every multi-device Activity view. It is now a small dismissable info alert; the dismissal persists in localStorage (aw-multidevice-note-dismissed), same approach as the supporter nudge on Home. The logic lives in src/util/multideviceNote.ts so it is unit-tested (Activity.vue itself does not load under jest).
  • Search $category: ["searched"] tag — the search query categorizes every event into a synthetic searched category to filter on it, and that leaked into each result row. Results now drop $category.

Not in this PR, with reasons

  • Browser apps always Uncategorized in Top Applications: root cause is structural, not a rule bug. app_events is merge_events_by_keys(title_events, ["app"]), which keeps only app, so the app row is classified from the app name alone. Rules match titles (GitHub, YouTube, …), and a browser's name matches none of them. Fixing it means picking a semantics: dominant category of the app's title events, or a per-app category from cat_events. That's a design call, so I'd rather not guess it in a minor-items PR.
  • Bar label contrast on bright colors: already implemented in fix(dark-mode): restore appsummary bar-chart label contrast #1002 (per-bar luminance label colour, clipping for labels that overflow the bar), which is open and green.
  • Sunburst label clipping and calmer default palette: not touched here.

Verification

  • jest test/unit/multideviceNote.test.js: 2 passed
  • eslint clean on changed files, tsc --noEmit clean, vue-cli-service build succeeds (this is the check that the pug template compiles)
  • Not verified visually: no multi-device screenshot in this PR

…rom search results

- Activity: the 'Browser and stopwatch data are only available when viewing a
  single device' note showed on every multi-device view. It is now a
  dismissable info alert; the dismissal persists in localStorage.
- Search: every hit carried `$category: ["searched"]`, the synthetic category
  the query uses for filtering. Strip it from the results.

Part of ActivityWatch#1058.

Git-Session-Id: a40d
@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Adds dismissable UI note and filters search results.

The PR appears safe to merge; no actionable issues were found.

What we checked:

  • Storage errors do not crash Activity: Both storage calls catch errors. The page still hides the note for the current view if saving fails.

Summary

Makes the multi-device note dismissible and saves that choice in localStorage. Removes the synthetic $category field from search results.

  • Adds unit tests for the saved dismissal choice.
  • No actionable issues found.
  • Runtime tests and visual checks were not performed during this review.

Reviews (1) · Last reviewed commit: "fix(ui): dismissable multi-device note; ..."

@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 63.35%. Comparing base (95cd6b4) to head (8c8c8d8).

Files with missing lines Patch % Lines
src/util/multideviceNote.ts 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1062      +/-   ##
==========================================
+ Coverage   63.30%   63.35%   +0.05%     
==========================================
  Files          52       53       +1     
  Lines        3608     3616       +8     
  Branches      892      887       -5     
==========================================
+ Hits         2284     2291       +7     
+ Misses       1309     1244      -65     
- Partials       15       81      +66     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

CI-green and mergeable (Greptile 5/5) — 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.

@ErikBjare
ErikBjare merged commit 58abaf4 into ActivityWatch:master Oct 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants