Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/arduino/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": "pipx install platformio && node scripts/prepare-demo.mjs arduino && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/cargo/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": ".devcontainer/cargo/setup.sh && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/cocoapods/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": "gem install cocoapods --no-document && node scripts/prepare-demo.mjs cocoapods && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/conan/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": "pipx install conan && node scripts/prepare-demo.mjs conan && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/go/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs go && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/hex/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs hex && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/maven/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs maven && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/npm/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs npm && npm --prefix demos/npm install --no-audit --no-fund && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/nuget/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs nuget && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/opam/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs opam && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/packagist/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs packagist && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/pub/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs pub && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/pypi/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs pypi && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/rubygems/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs rubygems && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/swift/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs swift && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/vcpkg/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"onCreateCommand": "node scripts/prepare-demo.mjs vcpkg && npm install -g @usedrift/cli",
"waitFor": "onCreateCommand",
"postAttachCommand": "sleep 10 && drift analyze < /dev/null",
"postAttachCommand": "drift analyze < /dev/null",
"customizations": {
"vscode": {
"extensions": [
Expand Down
30 changes: 12 additions & 18 deletions scripts/lib/devcontainer-spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -132,24 +132,18 @@ export function buildDevcontainer(demo, allDemos) {
// a GitHub issue or cut a branch for it, and here that parked the startup
// terminal on a question, flagged it as needing attention, and left the
// visitor one keypress from opening an issue on this repository.
// The sleep is about Workspace Trust, not about Drift.
//
// A Codespace can attach before trust has settled. Creating a terminal
// counts as executing code, so a terminal that starts in that window makes
// VS Code ask "Do you trust the authors of the files in this folder?" — and
// while that modal stands nothing else happens: the extension declares no
// untrusted-workspace support, so there is no panel, no analysis and no
// terminal until somebody answers it. Two of three Codespaces opened on
// 2026-09-11 hit exactly that; the one that did not had simply attached
// more slowly.
//
// There is no settings-based fix: `security.workspace.trust.*` is
// user-scope by design and is ignored from devcontainer, remote and
// workspace settings, which an earlier attempt here got wrong. So the
// terminal waits instead, which costs the demo ten seconds it was already
// spending on the first analysis, and DEMO.md says what to click if the
// question appears anyway.
postAttachCommand: 'sleep 10 && drift analyze < /dev/null',
// A fresh Codespace on this repository opens *untrusted*, and nothing here
// can change that. Creating a terminal counts as executing code, so this
// command is what makes VS Code ask "Do you trust the authors of the files
// in this folder?", and until the visitor answers there is no panel, no
// analysis and no terminal: the extension declares no untrusted-workspace
// support. Two attempts to configure the question away failed and were
// reverted — `security.workspace.trust.*` is user-scope by design and
// ignored from devcontainer settings, and delaying the terminal only moved
// the same modal later (four fresh Codespaces on 2026-09-11, all four
// prompted). So the terminal starts immediately, the question arrives at
// once rather than after a confusing pause, and DEMO.md says what to click.
postAttachCommand: 'drift analyze < /dev/null',
customizations: {
vscode: {
extensions: ['drift.usedrift'],
Expand Down
Loading