Repository navigation
Conversation
🎩 PreviewA preview build has been created at: |
Add an always-reachable Hide/Show control for the right-hand Dynamic Workarea. A hidden workarea takes zero width so the chat fills the row, and showing it restores the previous split clamped to the viewport. Hiding keeps the workarea mounted: tabs, selected documents, live pipeline-run providers, agent environments and tool bridges all stay registered, and new hidden agent targets still become ready. Hidden tabs are inert and their host shortcuts are inactive, including ReactFlow's own document-level Delete/Backspace, selection, multi-select, pan and zoom bindings, which are now gated on the live keyboard listening state instead of staying armed off-screen. Workarea hosts now distinguish a selected tab from a selected and visible one. Collapsing clears only the latter, so an already-consented pipeline migration on the selected tab can finish while hidden, while unselected tabs keep upstream behaviour. Background migration is opt-in and off by default, and a migration the user cancelled stays local even if consent arrives later from another tab. Agent-initiated opens respect a manual collapse; explicit human clicks on a resource, artifact, run or entity reveal the pane, and the reveal happens before the async open starts so a newer manual collapse wins.
Cut the test diff from ~1160 to ~420 lines. Drop assertions on classes, inline styles, inert/display attributes, store internals and prop plumbing, along with the heavy editor mock scaffolding they needed, and keep tests that describe what a person does: hide and show the pane, canvas keys while hidden, migration of the selected tab only, and a cancelled pipeline staying local. Migration coverage moves into the existing LocalPipelineMigration and pipelineKind harnesses instead of standing up the whole embedded editor. Fix a FlowCanvas test that batched keyDown and keyUp in one act(), which collapsed React Flow's key state in a single render and stopped the delete effect from ever running; the hidden-canvas assertions were passing regardless of the keyboard gating. Split the events so the test fails when the gating is removed. No production code changes.
Replace the header toggle with the left dock's own gestures. Dragging the chat/workarea divider 20px past where it stops snaps the workarea shut, with the same snap preview, and double-clicking the divider collapses it. Collapsed, the workarea becomes a 36px rail of its open tabs, the counterpart of the dock's collapsed rail. Double-clicking or dragging the rail's edge reopens the workarea, and each tab icon reopens it on that tab. The snap point is measured from wherever the divider actually stops (the chat's maximum or the workarea's minimum), so wide screens no longer have a stretch of drag where nothing happens. The 20px give is shared with the dock. Unlike the dock, the workarea keeps its content mounted while collapsed, so live runs, migrations and agent targets keep working. The narrow-window dock heuristic now budgets the 36px rail rather than the workarea's minimum while the workarea is collapsed. The project header returns to its state on master.
Volv-G
force-pushed
the
feat/collapsible-dynamic-workarea
branch
from
November 6, 2026 18:11
6a63c11 to
d032e5e
Compare
Volv-G
marked this pull request as ready for review
November 6, 2026 18:11
camielvs
reviewed
Nov 6, 2026
camielvs
left a comment
Collaborator
There was a problem hiding this comment.
🤖 This is an AI-generated code review comment.
9 findings, inline below (2 Medium, 7 Low). The two Medium ones are a narrow-window dock regression and a missing test for the no-consent background migration path.
Two notes that don't belong on a single line:
- Rail markup copies
DockArea. You already list merging them as a follow-up, and I agree. That's why the markup duplication in the rail and snap previews isn't flagged inline. - Snap feel on wide screens, for the tophat. On a 2560px row, dragging 20px past the 760px chat limit collapses a workarea about 1,400px wide. The preview warns first, and removing the dead zone was a deliberate choice, so this is a question, not a finding: does it trigger too easily when the workarea is far from its minimum width?
- Narrow-window dock: forget our own collapse as soon as the dock opens for any reason, so a dock the user reopened and then closed is never reopened by a workarea toggle or a resize. - Test that a collapsed tab without consent never prompts, checks write access or uploads. - Hide the collapsed workarea with the `hidden` attribute instead of an inline style, which also makes `inert` unnecessary. - Test React Flow's key gating on FlowCanvas alone through `keyboard.listening`, and cover the collapse → inactive link in the workarea test. - Share the rail's button and the tab-icon lookup, return `rowMeasured` from the chat width hook, rename the snap constant to DOCK_AREA_SNAP_OVERSHOOT, and drop comments that restated the code.
This branch has not been deployed
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.
Intent
Let people fold the right-hand Dynamic Workarea away when they want to focus on the chat, using the same gestures as the left dock, and without losing anything they had open in it.
Current behavior
The workarea is always on screen. Even with nothing useful in it, it keeps its share of the row and the chat stays capped at 760px. The left dock can be collapsed by dragging or double-clicking its edge, but the workarea can't be collapsed at all.
What changes
The workarea collapses and expands the way the left dock does.
inertand visually hidden. When collapsing strands focus inside it, focus moves to the rail.master. A pipeline the user cancelled stays local even if consent is granted later from another tab. This also fixes an existing bug onmaster, where such a tab migrated as soon as you returned to it. A collapsed, unconsented tab never shows a consent dialog and never uploads.Collapsed state lives in memory on the per-project store, so it resets on reload. The dock remembers its state, but persisting the workarea's would need a dock-persistence change, which is out of scope here.
How to test
Tophat: https://oasis-staging.shopify.io/tangent?tophat_location=feat%2Fcollapsible-dynamic-workarea%2Fed3df33 (build of
ed3df33)Assumes the normal frontend and backend are running.
Checks actually run on this branch:
tsc --noEmitpasses,eslinton all changed/new files passes with 0 errors and 0 warnings,prettier --checkis clean, and the fullvitestsuite passes (486/486 files, 5250 tests, 2 todo). Dependencies and the lockfile are unchanged.The tests are a small behaviour-focused set: the divider's double-click and drag-past-the-stop collapse, and a shorter drag only resizes; the snap point on 1512/1920/2560px rows; the rail's double-click reopening; collapse keeping your work and a rail icon reopening on its tab; an agent tab opening while collapsed without reopening the workarea or taking focus; canvas Delete/Backspace ignored while collapsed and working again once reopened; programmatic deletion still available while collapsed; only the selected tab finishing a consented migration; a cancelled pipeline staying local; and the narrow-window dock budget. Each was confirmed to fail when its fix is reverted.
Verification gaps:
ProjectChatAreaonOpenArtifact) and opening an asset (AssetsWindowContent) also reopen the workarea, and neither has a test.Follow-ups:
DockArea, which the pipeline editor also uses, so it's left out of this PR.Related Issue and Pull requests
Touches the React Flow keyboard area covered by #2925 (disabled canvas e2e suite).
Type of Change
Line Breakdown
Checklist
Additional Comments
AI-assisted: written and validated by an agent, then reviewed by independent agents over several rounds, with the results above. The reviews caught and fixed:
keyDown/keyUpin oneact(), which made its collapsed-canvas assertions pass regardless of the keyboard gating;An earlier version used a header toggle. It worked, but collapsing should match the left dock, so the toggle was replaced and the header is unchanged from
master. Browser geometry and staging remain unverified, so this stays a draft.