feat(desktop): stop an agent watching a page from its row in the watcher menu

Merged
SA
1mo ago
+206-8

Summary

  • The page watcher menu ended each agent row with an arrow that only opened the terminal. Each row now ends with an X (hover/focus revealed, styled like the sidebar's close button) that stops that agent watching on whichever host owns it. Clicking the row still opens the terminal.
  • Rows carry their host URL so the stop reaches the right host. Rows whose workspace this machine does not know are no longer rendered disabled (the disabled style blocks pointer events and would hide the X); they just do not navigate.
  • "Stop watching" / "Could not stop watching" translations restored into every locale catalog from git history.

This restores what the original menu in #6952 had before the per-agent rewrite dropped it.

Verification

Screenshots and measurements: https://app.superset.sh/page/page-watcher-stop-button-n59eeh

Driven over CDP in the dev desktop app with real mouse input: after clicking the X the header badge and the terminal's eye chip disappear, the host lists no watchers, the page's cloud watch flag is false, the route is unchanged, and no console errors fire. The watch itself was assigned through the host API rather than a real pages publish.

  • Menu tests: 13 pass (3 new: stop on own host without navigating, stop for an unknown-workspace row, stop only the clicked row).
  • lint, sherif, typecheck, check:i18n clean. Turbo test green except desktop git/shell fixture suites that pass when rerun alone and do not touch this code.

🤖 Generated with Claude Code


Summary by cubic

Adds a stop-watching button to each agent row in the page watcher menu, letting you stop an agent from watching a page directly without opening its terminal. Each row now ends with an X (revealed on hover/focus) that calls pageWatch.unwatch on the host that owns the watcher; clicking the row still opens the terminal.

Rows now carry their host URL so the stop reaches the right host. Rows whose workspace isn't known locally are no longer rendered disabled (the disabled style blocked pointer events and hid the X); they just don't navigate. Restores the "Stop watching" and "Could not stop watching" translations to every locale catalog.

Summary by CodeRabbit

  • New Features
    • Stop watching a page directly from its watcher menu. The action targets the selected watcher’s host, so other watchers remain active.
    • Watcher entries remain available when a workspace name is missing, though they cannot be selected for navigation.
  • Bug Fixes
    • Failed stop-watching actions now display an error message.
  • Localization
    • Added translated stop-watching actions and error messages in supported languages.