Skip to content

feat(workspace): read-only editor frame (split tree | editor, tabs, diff toggle, full screen), Shiki CodeSurface, TraceWorkspace (0.138.0) - #452

Merged
drewstone merged 23 commits into
mainfrom
feat/files-split-view
Oct 26, 2026
Merged

drewstone merged 23 commits into
mainfrom
feat/files-split-view

Conversation

@drewstone

Copy link
Copy Markdown
Contributor
  • CodeSurface and CodeView highlight with the Shiki highlighter that DiffView already uses (through @pierre/diffs), so Rust, TOML, Go, C and C++, Solidity, SQL, shell, Dockerfile and every other Shiki language render highlighted; each grammar loads on first use. CodeView adds copy, a wrap toggle and go to line (Ctrl/Cmd+G), and both follow the host's light or dark theme unless themeType is set. react-syntax-highlighter leaves the package. BRAND_PRISM_THEME and resolveLanguage are removed (no consumers); CODE_THEME names the shared theme.
  • WorkspaceFilesPane keeps the tree and the open file side by side by default (layout="split") from 640 px of the pane's width, with a resizable sidebar: an ARIA separator you drag or move with the arrow keys (Shift for larger steps, Home/End), double-click resets it to 280 px, it stays between 200 px and half the pane, and it is remembered per viewer under expansionKey. The viewer fills the rest with its own scroll and a sticky path header. Narrower, or with layout="stack", the preview replaces the tree until Back.
  • WorkspaceFilesPane is a read-only editor frame: opened files keep tabs in the split layout, preview.compare adds a File | Diff toggle (such as against the previous release), and a full-screen toggle returns on Escape (tabs, expandable, both on by default). TraceWorkspace opens the selected agent's transcript in a right-hand drawer (close button or Escape clears the selection, and onSelectAgent receives undefined), lifts that agent in the waterfall and dims its peers, and gives the code workspace the full width at no less than 70% of the viewport; the scoreboard renders only when given. WorkspaceFilesPane moves focus to Back only when the reader opened the file from the tree; a preview that arrives from an initial or loaded selectedPath leaves focus where it was.
  • ./run adds TraceWorkspace: the agent timeline and span waterfall (TraceWaterfall, charts FlowWaterfall with Sandbox UI's brand marks) beside the selected agent's live conversation, streamed from a per-agent Server-Sent Events URL (streamUrl(agentId); rows, reset and end events, reconnecting with ?after=lastSeq) and rendered with AgentTimeline (text merges into the turn, tool calls are rows their results complete, reasoning stays collapsed). The panel follows new output unless the reader scrolled up, then shows a "New output" pill. Scrubbing is time travel: onTimeChange(t | null) reports the cursor, events draw as an event track (click or N/P), the conversation shows what had been said by t, and the page's files and scoreboard slots render as of the cursor or say "not time-indexed". useAgentStream and foldAgentRows are exported for hosts that render the stream elsewhere.
  • @tangle-network/sandbox-ui/workbench/diff exports DiffView alone, so an artifact-only consumer loads the diff without the terminal workspace (xterm). The packed-artifact smoke builds a clean consumer of both focused entries and checks for one shared UI directory and no xterm.
  • ./run needs @tangle-network/charts ^0.20.3, an optional peer: only TraceWaterfall and TraceWorkspace load it.

Why now. The run page's layout gate 3 (disco-ui-review REVIEW, 04:20Z) needs the [tree | editor] frame at 70vh with tabs and a diff toggle; agent-record adopts it once this publishes.

Supersedes #443 (its focused ./workbench/diff entry and packed-consumer check are folded in).

Release. The package.json bump to 0.138.0 fires Auto Release.

Run ID: run_369e8dcc6188e337ad6eda9097f3a5e9

…series primitives from ./primitives and the root
…ffView uses

CodeSurface renders through @pierre/diffs' File, the same Shiki highlighter and theme as DiffView, so every
Shiki language highlights and each grammar loads on first use. CodeView adds copy, a wrap toggle and go to
line (Ctrl/Cmd+G); both follow the host theme. react-syntax-highlighter, BRAND_PRISM_THEME and
resolveLanguage leave the package.
CatalogLight/Dark, DetailLight/Dark and DiffView DarkTheme/LightTheme set globals.sandboxTheme, which outranks
the URL global, so their opposite-theme runs failed the page-theme assertion on main as well.
… stories

Full run at ca4d29e on beelink2 with --update-snapshots=changed: 51 changed (ui 11.42.0 primitives: status-chip
glyph, IntegrationsPanel collapses behind Show all 28, input and button borders) and 8 missing (AgentProfilePicker
host-editor and save-recovery). Samples compared against main's baselines before committing.
…with a resizable, keyboard-operable sidebar

From 640 px of the pane's own width the tree and the open file sit side by side; the divider is an ARIA
separator (drag, arrows, Shift for larger steps, Home/End, double-click resets to 280 px), clamped to
200 px .. half the pane and remembered per viewer under expansionKey. The viewer fills the rest with its own
scroll and a sticky path header. Narrower, or with layout="stack", the preview replaces the tree until Back.
…en); TraceWorkspace transcript drawer with lifted selection
# Conflicts:
#	src/index.ts
#	src/primitives/index.ts
…l peer, changesets folded into the changelog
tangletools
tangletools previously approved these changes Oct 26, 2026

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved PR — 8f6889b6

Blanket team auto-approval is intentional. This is not a code review.
No automated review runs on this PR. This approval rests on the rule above alone.

tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-26T05:00:12Z

… split layout labels tabs by filename, path in the tooltip and the tree)

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved PR — ad042900

Blanket team auto-approval is intentional. This is not a code review.
No automated review runs on this PR. This approval rests on the rule above alone.

tangletools · auto-approval · reason: blanket_auto_approve · 2026-10-26T05:35:18Z

@drewstone
drewstone merged commit a2c03e2 into main Oct 26, 2026
drewstone added a commit that referenced this pull request Oct 27, 2026
fix(deps): adopt @tangle-network/ui 11.46.0 (1.1.5)

Consumers such as agent-record load `@tangle-network/sandbox-ui/styles`, which is compiled from the kit's sources at this package's build time. A kit release therefore reaches their pages only after this package rebuilds. @tangle-network/ui 11.46.0 changes two things: The row SegmentedControl is a compact well with a raised selected thumb instead of three stacked rings, and it sits inside a 44px toolbar (brand #450). RunRowShell keeps its description on a phone (brand #452).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants