You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(browser): manage inactive tab resource use #47
Resource use across many visited chats is measured and controlled without silently losing active work.
Acceptance criteria
Record a reproducible baseline across many chats/tabs for live tab count, memory and CPU before choosing policy; report measurements rather than assumed savings.
Implement a documented inactivity/resource policy with protected active, busy, transfer and unsaved-work cases.
Recoverable tabs retain supported URL/history metadata and return with access off when a view is recreated.
No automatic provider/tool replay, form submission or unsafe forced disposal is introduced.
A representative benchmark and lifecycle tests demonstrate the chosen behavior and document limits when a tab cannot be safely reclaimed.
Blocked by
None - can start immediately.
Context
Source: revised CM_Browser review and whole-tab Agent Access requirement, 2 October 2026. This is follow-up work to the previously completed bounded browser implementation; existing issues remain closed.
Preserve main-process ownership, explicit revocation, stale-target protection and isolation from unrelated tabs. Coordinate with ongoing browser changes and the separate Microsoft sign-in fix. Native validation must distinguish fixture results from actual authenticated-site evidence. Do not restart the installed app or server, modify real calendar events, or enter/change/submit timesheets.
Implementation checkpoint saved; remaining acceptance work stays open.
Private lazy restoration and reproducible eager/lazy memory/CPU fixture measurements are committed. Existing live visited pages are retained; representative visited-chat resource qualification and safe live reclamation remain incomplete.
Local commit: 7f746e8fcb7d2ad819b107aac2c0d7d9462d1361 on branch browser-gaps. This commit has not been pushed, merged or released.
Fresh checkpoint validation: 410 tests / 6,620 assertions pass; all five affected package typechecks and the browser plugin build pass; native navigation and leave-confirmation reruns pass; scoped lint has 0 errors and 356 style warnings; formatting and whitespace checks pass. Earlier native fixture results are documented in the committed cm-browser README. These checks do not qualify authenticated Teams, macOS or a packaged app.
Inactive tabs now have an explicit Unload tab action with a default-Cancel URL/history-only recovery disclosure. Main protects active, pinned, loading, granted, busy, transferring, media, unsaved and unknown cases. Approval is bound to the owner, document and deadline, and disposal rechecks protection. Native beforeunload can veto. Recreated tabs have fresh identity, Agent Access off and no destination request until selected; no provider/tool replay, form submission or forced disposal was added.
Resource policy qualification, reproducible benchmark and lifecycle evidence records the baseline and three paired synthetic visited-chat runs. The final paired sample changed from 12 renderers / 1,842 MiB observed working set to 1 renderer / 142 MiB, leaving 11 tabs dormant. Short CPU samples do not establish sustained energy savings. Native lifecycle/protection checks, 10 policy unit cases, mounted UI checks and package typechecks passed. The push hook passed all 31 configured typecheck tasks.
Qualification used Windows Electron 44.3.0 / Chromium 152.0.7977.78, disposable profiles and synthetic loopback pages. Memory sums can double-count shared pages; machine conditions affect observations. One earlier fixture timeout was not reproduced by the unchanged passing diagnostic run, and no timeout root-cause fix is claimed. DOM inspection cannot certify arbitrary application state as saved, which is why protected/unknown pages remain live and eligible unloading still requires explicit confirmation.
Authenticated workload savings, physical dialog accessibility, macOS and packaged builds remain outside this qualification. This is a pushed implementation and acceptance checkpoint, not a merge or release. The separate page-origin asynchronous Leave limitation remains tracked in #48.
Activity
trmosala commentedon Oct 2, 2026
Implementation checkpoint saved; remaining acceptance work stays open.
Private lazy restoration and reproducible eager/lazy memory/CPU fixture measurements are committed. Existing live visited pages are retained; representative visited-chat resource qualification and safe live reclamation remain incomplete.
Local commit:
7f746e8fcb7d2ad819b107aac2c0d7d9462d1361on branchbrowser-gaps. This commit has not been pushed, merged or released.Fresh checkpoint validation: 410 tests / 6,620 assertions pass; all five affected package typechecks and the browser plugin build pass; native navigation and leave-confirmation reruns pass; scoped lint has 0 errors and 356 style warnings; formatting and whitespace checks pass. Earlier native fixture results are documented in the committed cm-browser README. These checks do not qualify authenticated Teams, macOS or a packaged app.
Native UI screenshot and validation archive. No installed app/server was restarted and no real account data was modified.
trmosala commentedon Oct 3, 2026
Completed and pushed to
browser-gaps. Implementation:62785d5234. Current pushed checkpoint:2d582ec4484fad03b3f6792c1eab2275e682d1cf.Inactive tabs now have an explicit Unload tab action with a default-Cancel URL/history-only recovery disclosure. Main protects active, pinned, loading, granted, busy, transferring, media, unsaved and unknown cases. Approval is bound to the owner, document and deadline, and disposal rechecks protection. Native beforeunload can veto. Recreated tabs have fresh identity, Agent Access off and no destination request until selected; no provider/tool replay, form submission or forced disposal was added.
Resource policy qualification, reproducible benchmark and lifecycle evidence records the baseline and three paired synthetic visited-chat runs. The final paired sample changed from 12 renderers / 1,842 MiB observed working set to 1 renderer / 142 MiB, leaving 11 tabs dormant. Short CPU samples do not establish sustained energy savings. Native lifecycle/protection checks, 10 policy unit cases, mounted UI checks and package typechecks passed. The push hook passed all 31 configured typecheck tasks.
Qualification used Windows Electron 44.3.0 / Chromium 152.0.7977.78, disposable profiles and synthetic loopback pages. Memory sums can double-count shared pages; machine conditions affect observations. One earlier fixture timeout was not reproduced by the unchanged passing diagnostic run, and no timeout root-cause fix is claimed. DOM inspection cannot certify arbitrary application state as saved, which is why protected/unknown pages remain live and eligible unloading still requires explicit confirmation.
Authenticated workload savings, physical dialog accessibility, macOS and packaged builds remain outside this qualification. This is a pushed implementation and acceptance checkpoint, not a merge or release. The separate page-origin asynchronous Leave limitation remains tracked in #48.