feat: dgbuild new-skein / open-skein — interactive Skein UI without VS Code - #15
Merged
Merged
Conversation
Run the full Skein UI - transcript, nav graph, trace - from a browser with no VS Code. Both commands stand up the existing SkeinService on localhost, open a browser, and block until the in-UI Quit button or Ctrl+C. Quit prompts to save when the skein has unsaved changes, then tears the server and dgdebug down cleanly. - ServiceConfig gains standalone + onQuit; SessionDisplayInfo carries standalone/dirty so the extension's output is unchanged - POST /actions/quit with the save/force/confirm-modal flow - reference-identity dirty tracking in SkeinService - Trace opens in a second browser tab (window.open from the button's own handler, since the menu popover stops event propagation) - fix compounding trace-tree indentation: one fixed CSS step per level on .trace-children instead of a per-node margin scaled by dgdebug's raw stack depth Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RTppFtoRZ3ZmWYF14xDiXX
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.
What
Two new
dgbuildcommands that run the full interactive Skein UI — transcript, nav graph, trace panel, keyboard shortcuts — from a plain browser, with no VS Code:dgbuild new-skein [name]— create a skein (defaultdefault), refuse to overwrite an existing onedgbuild open-skein [name]— open an existing one, refuse a missing/non-dgdebug skein, replay every branch on load (same as the extension)Both stand up the existing
SkeinServiceonlocalhost, print the URL, open a browser (--no-opento skip), and block until the in-UI Quit button or Ctrl+C. Options:--seed(new only),--port,--theme <light|dark>,-p/--project,-v/--verbose.dgdebugonly for now.How
SkeinServicealready serves every interactive route — this reuses it wholesale via a headless host (src/cli/commands/skein-server.ts), the counterpart ofextension.ts's wiring. No logic duplicated.ServiceConfiggainsstandalone+onQuit; both threaded throughSessionDisplayInfoso the extension's rendered output is byte-identical (everything is gated off whenstandaloneis unset)SkeinTreeis immutable-persistent) — O(1), all inservice.tsPOST /actions/quit→ if dirty, broadcastsk.showQuitModal()(Save and Quit / Quit Without Saving / Cancel); otherwise broadcast a "you may close this window" screen to the transcript and any open/tracetab, then fireonQuit. Ctrl+C also tears down cleanly (warns, can't save).beforeunloadguards an accidental tab close.window.openruns in the Trace button's owndata-on:click— the menu popover'sdata-on:click__stopswallows the event before a document listener would see it. Row click-to-open-source is a no-op here (no editor); hover preview still works.renderRowscaledmargin-leftby dgdebug's raw stack depth on an element that's already nested in its parent's. Now one fixed CSS step per level on.trace-children.Tests
new-skein.spec.ts/open-skein.spec.ts— option parsing + create/open guardsskein-server-integration.spec.ts— realdgdebug: standalone page,send-command→ dirty →showQuitModal, save → clean →showShutdownScreen,openreplays clean, self-skips without the toolchainrender.spec.ts/traceRender.spec.ts/knot-menu.spec.tstsccleanVerified end-to-end against
sanddancer-dialog(554-knot skein) in Chromeopen-skeinloads clean, navbar shows the Quit button, Trace opens/refocuses one/tracetab that live-updates, the indentation fix renders a tight staircase, Ctrl+C shuts down with no orphandgdebug.🤖 Generated with Claude Code