Repository navigation
feat(web): step Back through open work-area tabs in narrow mode - #283
Closed
orbitingflea wants to merge 1 commit into
Closed
orbitingflea wants to merge 1 commit into
orbitingflea wants to merge 1 commit into
Conversation
|
This PR changes the test suite by +74 test cases (browser +25, unit +49, server 0). New browser test files: Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing. |
Thread transfer impact
This comment will update automatically after the next completed run. |
orbitingflea
force-pushed
the
feat/fullscreen-panels-narrow-back
branch
from
November 24, 2026 15:16
746ec96 to
b3f8ff2
Compare
In a window 980 px wide or less, a user's tab open or switch pushes a same-URL history entry, and a session-storage map keyed by the entry's key records the thread and tab it shows. Back shows the previous open tab, skips closed tabs, and leaves the thread after the starting tab. One history listener per browser history, installed with the router, makes the skips that must not depend on the shown thread: wide windows step as if the tab entries were not there, and entries of deleted threads (and their side chats) are skipped. Entries the app adds itself are tagged when reached, a quote link keeps its own reveal, closing Settings or Usage keeps Forward free of the modal, and Reopen Closed View and the delete fallback treat our tab steps as no navigation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
orbitingflea
force-pushed
the
feat/fullscreen-panels-narrow-back
branch
from
November 24, 2026 22:52
b3f8ff2 to
f657900
Compare
Owner
Author
|
Closing in favor of a minimal narrow-only, zero-upstream-file rebuild targeting proto/fullscreen-panels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
At 980 px or less the work area shows one tab at a time, so Back used to leave the thread instead of stepping through its open tabs.
Behaviour change
Behaviour change: yes, phone and narrow-window users (980 px or less) see Back return to the previous open tab of the thread instead of leaving it; wide windows are unchanged.
What changed
Track narrow tabs with a session-storage map and a router-installed history listener, skip dead entries always and pushed entries when wide, wire
WorkArea.tsx, hook router, modal Close, Reopen, and delete, and updateREADME.md.Scope
apps/web/src/fork/workArea/,README.md, and small hooks inapps/web/src/router.ts,components/sidebar/mainAppLocation.ts,components/ReopenClosedViewShortcut.tsx, andhooks/useThreadActions.ts. UI text is unchanged.Tradeoffs
Multi-entry jumps from the browser's Back menu keep Forward history and do not change tabs.
Blast Radius
Work-area code plus four small upstream hooks. Wide windows push no user tab entries and skip pushed entries, one base per Back, and dead entries.
Verification
Unit, Chromium browser, existing work-area, router, reopen, delete, and modal-close tests, and changed-files checks pass.
Details
Behaviour rules
(max-width: 980px), showing one tab.{ thread, tab }for the newest 500 entries, pluspushedon our pushes anddeadon deleted threads; blocked storage falls back to memory.pushedentry; untagged entries of the shown thread take the shown tab.pushedentry in both widths, keeping Back and Forward right without reopening the modal; unmarked Back-menu jumps push nothing and keep Forward.getRouterand never removed, handles marked closes and skipsdeadentries in both widths pluspushedentries and one base on Back when wide.Per-file notes
tabHistoryTags.ts:TabTags,createTabTags,tabHistoryTags.tabHistory.logic.ts: pure helpers (planPush,decideMove,decideHistoryMove,isTabStep).tabHistory.ts: listener,installTabHistoryHub,noteAppModalClose,markTabHistoryThreadDeleted,onlyOwnTabPushesSince,isWorkAreaTabStep,watchTabHistory,useTabHistory.router.ts: callsinstallTabHistoryHubingetRouter.components/sidebar/mainAppLocation.ts: callsnoteAppModalClosebefore Close steps back.WorkArea.tsxcallsuseTabHistory;README.mdnotes narrow Back.components/ReopenClosedViewShortcut.tsx: checksonlyOwnTabPushesSincefor queued reopens.hooks/useThreadActions.ts: marks deleted threads and side chats withmarkTabHistoryThreadDeleted; checksisWorkAreaTabStep.Tests
tabHistory.logic.test.ts: pure rules, skips, storage, quotes, modal Close, unmarkedGO, basepath, push runs, listener order, deleted threads.tabHistory.browser.test.tsx: narrow steps, wide and fresh-mount skips, quotes, narrow and wide modal Close, Back-menu jumps, Reopen races, deleted side chats, delete steps, reload skips.