Repository navigation
feat(demo): start both halves of Drift without a click - #22
Merged
Merged
Conversation
A Codespace opened from the landing page has to show Drift working, not a repository with a README about it. Three things were missing. The CLI was absent entirely: nothing installed `@usedrift/cli`, so `drift` was not on the PATH in any demo. Each container now installs it at creation, which is free — every image already has Node for the prepare script. The panel needed a click. The extension showed a startup notification and opened only if the visitor found and pressed it. `drift.ui.openOnStartup` reveals it as the window opens, before the analysis runs, so the visitor watches the work rather than arriving at a finished verdict. The CLI needed a terminal. `postAttachCommand` runs `drift analyze` on the one demo directory, in a real terminal in the editor, on attach and on resume. DEMO.md no longer tells the visitor to open the Activity Bar, since both halves are already running, and says how to re-run the CLI themselves. Co-Authored-By: Claude Opus 5 <[email protected]>
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.
A Codespace opened from the landing page has to show Drift working, not a
repository with a README about it. Three things were missing.
The CLI was absent entirely. Nothing installed
@usedrift/cli, sodriftwas on no demo's PATH. Each container now installs it at creation, which is
free — every image already has Node for the shared prepare script.
The panel needed a click. The extension showed a startup notification and
opened only if the visitor found and pressed it.
drift.ui.openOnStartup(added in trydrift/drift#246) reveals it as the window opens, before the
analysis runs, so the visitor watches the work rather than arriving at a
finished verdict.
The CLI needed a terminal.
postAttachCommandrunsdrift analyze --dir demos/<ecosystem>in a real terminal in the editor —postAttachrather thanpostCreateso it repeats on resume, and--dirscoped so it analyses the one demo rather than all sixteen.
DEMO.mdno longer tells the visitor to open the Activity Bar, since bothhalves are already running, and says how to re-run the CLI themselves.
All changes go through
scripts/lib/devcontainer-spec.mjsand were regenerated,so
check-demos.mjspasses and the sixteen devcontainers cannot drift from it.Depends on
drift.drift(VS Code Marketplace) and@usedrift/cli(npm)being published. Until then a Codespace comes up with a correct fixture and
nothing to analyse — silently, since a missing extension no-ops rather than
erroring. The README and
docs/browser-demo.mdsay so.🤖 Generated with Claude Code