Skip to content

perf(renderer): stop closed workspace modals scanning and sorting every agent #782

Closed

Description

@Juliusolsson05

React-wide audit found AgentActivityModal, CloseOldAgentsModal and BulkProviderSwitchModal remain mounted behind closed Dialogs while their useMemo row builders still scan tabs/sessions on every workspace runtime replacement. Close Old Agents additionally scans retained transcript entries for last activity, then groups/sorts rows and projects. Their timers are open-gated but the expensive derived rows are not (AgentActivity even describes them as guarded by open). Expected: no session enumeration/row derivation while closed; reopening derives current state immediately; visible previews stay live; close/switch actions retain live revalidation. Keep mounted component state and existing effects rather than changing modal lifetimes. Regression: deliver repeated runtime replacements to a closed modal and assert no enumeration, then open/update/close and verify derivation happens only while visible. Refs #763, #103.

Activity

  1. Juliusolsson05 commented on Sep 5, 2026

    @Juliusolsson05
    OwnerAuthor

    Implemented in PR #785. All three mounted-modal regression tests pass locally: hidden runtime updates perform zero session enumeration; opening, visible updates and reopening show current data. Modal state/action lifetimes and destructive-action revalidation are preserved.

  2. Juliusolsson05 commented on Sep 5, 2026

    @Juliusolsson05
    OwnerAuthor

    PR #785 is ready for review with all 35 focused tests and full clean macOS CI green at 673f4aa, including packaged-output verification. No merge or live-app restart performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions