Skip to content

feat(demo): start both halves of Drift without a click - #22

Merged
RodolpheKouyoumdjian merged 1 commit into
mainfrom
feat/demo-autostart
Sep 9, 2026
Merged

RodolpheKouyoumdjian merged 1 commit into
mainfrom
feat/demo-autostart

Conversation

@RodolpheKouyoumdjian

Copy link
Copy Markdown
Contributor

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 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. postAttachCommand runs
drift analyze --dir demos/<ecosystem> in a real terminal in the editor —
postAttach rather than postCreate so it repeats on resume, and --dir
scoped so it analyses the one demo rather than all sixteen.

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.

All changes go through scripts/lib/devcontainer-spec.mjs and were regenerated,
so check-demos.mjs passes 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.md say so.

🤖 Generated with Claude Code

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]>
Copilot AI lite review requested due to automatic review settings September 9, 2026 21:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@RodolpheKouyoumdjian
RodolpheKouyoumdjian merged commit 83a3c09 into main Sep 9, 2026
1 check passed
@RodolpheKouyoumdjian
RodolpheKouyoumdjian deleted the feat/demo-autostart branch September 9, 2026 21:35
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