Fix mobile Feed notification duplicates and update warning

Merged
AZ
5d ago
+878-563

Summary

  • Keep feed.list and feed.text sourced only from retained agent workstream events.
  • Stop notification history revisions from waking the agent Feed.
  • Treat a partially capable Mac set as a usable Feed when at least one capable Mac has rows.
  • Hide legacy source: notification rows already present in older phone snapshots.

Changelog

  • Fixed duplicate notification rows appearing in the mobile Agent Feed.
  • Fixed the update warning appearing above valid Feed rows when another paired Mac is older.

Verification


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

The mobile Agent Feed now uses agent workstream events only, preventing duplicate notification rows and mixed-version update warnings across paired Macs. The change also hardens window teardown and repairs related UI, cloud error, test, and CI paths.

Bug Fixes

  • Keeps notification history in the Notifications tab while filtering legacy source: notification rows from Feed ingestion and rendering.
  • Preserves the legacy Feed revision namespace and cached feed.text reads without emitting feed.changed for notification updates.
  • Treats a Mac set with at least one capable Mac as Feed-ready and removes stale cloud-agent "Starting…" status.
  • Resolves deferred window callbacks by identity to avoid crashes during teardown.
  • Maps unavailable cloud links to user-facing copy, uses the configured accent for the unread badge, and restores sidebar template previews.

Tests and Refactors

  • Moves VM tree rendering into a shared module and adds Feed, revision, notification-history, cloud-link, and window-lifecycle regression coverage.
  • Repairs CI fixtures and test infrastructure for hook delivery, app-host source paths, synthetic windows, CLI fixtures, and local SSH execution.

Summary by CodeRabbit

  • Bug Fixes
    • The Agent Feed no longer includes notification history; notification records remain available in the Notifications tab.
    • Feed status no longer incorrectly indicates that a Mac update is required when connected Macs lack feed support. The feed reports as ready when its existing availability and fetch checks are satisfied.
    • Workstream changes update the Feed independently of notification-history changes. Feed text is available only for retained workstream items; missing items return a not-found response.
    • The unread notification indicator now uses the app’s configured accent color.