fix(tui): rebuild dag inspector on the chat design language - #137
Merged
Conversation
Replaces the diff-viewer frame vocabulary with the chat transcript's: rail and panel blocks instead of box-drawing lines, two-column side padding, and a fixed 42-wide sidebar gated on the same > 120 terminal width chat uses. - Responsive sidebar: below 120 columns the sidebar squeezed node names into 4-character truncation, so it is dropped and the summary block carries the workflow position instead. - Selection now uses primary + selectedForeground() for the node cursor and backgroundElement for the secondary workflow selection, matching the select dialog's focused/unfocused semantics. backgroundElement alone meant "selected but unfocused" and read as an 8% luminance nudge. - Cursor keys only: down/up move nodes, left/right switch workflows, return opens, escape closes. j/k/h/l/tab/q are gone and pause/resume/step/cancel are unbound by default, reachable through the command palette instead, so the footer stays a single uncrowded row. - Tightens the lint ratchet to 4690: a runCommand test helper collapses ten duplicated command-context assertions into one.
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.
Summary
Rebuilds the
/daginspector on the chat transcript's design language instead of the diff-viewer's frame vocabulary. Box-drawing lines (─┬├┴) are gone; the screen is now rail-and-panel blocks with two-column side padding, exactly asroutes/sessionrenders messages.A grilling pass over the first attempt found three real defects, all fixed here.
1. Sidebar was not responsive (severe)
Chat gates its 42-wide sidebar on
dimensions().width > 120(routes/session/index.tsx). The first attempt rendered it unconditionally. Measured at 60 columns:Now gated on the same threshold. Below it the sidebar is dropped and the summary block carries
workflow 1/2so the left/right cursor stays legible. Locked in by a new regression test asserting the sidebar appears at 130 columns and is absent at 100.2. Selection used the "unfocused" highlight
dialog-selectusesprimary+selectedForeground()for the active row and degrades tobackgroundElementonly when focus moves away. The first attempt usedbackgroundElementfor the focused state — semantically "selected but unfocused", and only an 8% luminance step (#0a0a0a→#1e1e1e), so the cursor was nearly invisible on low-contrast terminals.Node cursor (what
returnacts on) now usesprimary+selectedForeground(); the secondary workflow selection keepsbackgroundElement. One strong highlight on screen, no ambiguity about whatreturntargets.3. Fixed layout for the empty state
Panels keep a fixed layout: the sidebar is present whenever the terminal is wide and simply empty when there is nothing to list. The empty state also gained a
Run /dag-flow <task> …hint — previously it was a dead end, which is what made an earlier UI change look like "nothing changed" (the empty state is byte-identical across versions since it was never restyled).Cursor-only interaction model
dag.down/dag.upj,down/k,updown/updag.next_workflow/dag.previous_workflowl,right,tab/h,leftright/leftdag.closeescape,qescapedag.enterreturnreturndag.pause/resume/step/cancelp/r/s/xnoneThe four control operations gain
namespace: "palette"so they stay reachable through the command palette — without it, unbinding them would have made the capability unreachable, since route commands registered viauseBindingsare not palette-visible by default. A test pins this. The footer is now a single uncrowded row:enter open session escape close.Test plan
tsgo --noEmitclean inpackages/tuipressKey("p")tests to invokedag.pausedirectly, and replaced the contextual-footer assertion with one that verifies control hints never appearrunCommandtest helper collapses ten duplicated command-context assertions into one, a net reduction of 14 warnings