Skip to content

feat: offer a first task after Codex or Claude Code installs - #264

Merged
yujiezhang-ops merged 5 commits into
claude/compat-mode-flowfrom
feat/first-task
Nov 20, 2026
Merged

yujiezhang-ops merged 5 commits into
claude/compat-mode-flowfrom
feat/first-task

Conversation

@yujiezhang-ops

Copy link
Copy Markdown
Collaborator

Stacked on claude/compat-mode-flow, which is not in main yet. Review the diff against that base; this lands in main only after the base does.

Summary

Work package P0-D of #258. An install ended on a page that said it had finished and nothing else.

The install task page now offers one small task for Codex and Claude Code: the Agent writes an introduction page in a fresh directory under the system temporary directory, and the page shows that directory, the files written and the run record. A run that fails or writes nothing says so and offers a retry and the Provider page.

Nothing is sent until the button is pressed, and the text beside it says the run is billed by the Provider.

How each Agent is confined

  • Codex runs in its workspace-write sandbox, with sandbox_workspace_write.network_access=false forced on the command line so a user's own config.toml cannot turn the network on.
  • Claude Code gets the Write tool only and starts in the directory. It has no working-directory flag, so the process runner gained one; it travels on the context, like the activity paths do.

Saved Provider keys, the compatibility-mode key and key-like environment values are redacted from the run record. A directory nothing was written to is removed; one with files is kept.

Other Agents, and every desktop app, are not offered the task: BootAgent has no unattended way to drive them. That includes WorkBuddy, which the first-run PR selects by default.

Refs #258

Checked

  • go test ./..., go vet ./..., staticcheck ./...
  • pnpm run test (675 passed) and pnpm run build
  • pnpm run test:e2e (14 passed); the wizard test now runs the task through the binding
  • One real run with Codex 0.153.4: 2m52s, one self-contained index.html of 13.5 KB, no writes outside the directory, 70,330 tokens by Codex's own count

Not checked

  • Claude Code was never run for real. Its flags were only checked against --help.
  • That Codex's network was actually blocked: the flag was accepted, but the run record keeps the last 8,000 characters and the sandbox banner had scrolled out.
  • Redaction against real saved keys. The real run used an empty data directory, so only the unit test covers it.
  • Not run in a native desktop window.

Known rough edges

  • The real run took nearly three minutes and 70k tokens, more than "a minute or two" on the button suggests.
  • For a successful run the record is mostly the page's diff.

Merge note

Conflicts with the first-run PR in frontend/src/i18n.tsx: both append entries at the same place. Keep both sides.

🤖 Generated with Claude Code

yujiezhang-ops and others added 5 commits November 19, 2026 17:19
An install ended on a page that said it had finished and nothing else, so
a new user had an Agent and no evidence it could do anything.

The install task page now offers one small task for Codex and Claude Code:
the Agent writes an introduction page in a fresh directory under the
system temporary directory, and the page shows that directory, the files
written and the run record. A run that fails or writes nothing says so and
offers a retry and the Provider page. Nothing is sent until the button is
pressed, and the text beside it says the run is billed by the Provider.

Each Agent is confined by its own means. Codex runs in its workspace-write
sandbox with network access forced off. Claude Code gets the Write tool
only and starts in the directory, which needed a working directory on the
process runner; it travels on the context like the activity paths do.

Saved Provider keys, the compatibility-mode key and key-like environment
values are redacted from the run record. A directory nothing was written
to is removed; one with files is kept.

Other Agents, and every desktop app, are not offered the task: BootAgent
has no unattended way to drive them.

Refs #258

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…at/first-task

# Conflicts:
#	frontend/src/i18n.tsx
SelectField closed its list on any scroll, because the list is positioned
from the trigger. Scroll events are delivered a frame late, so a scroll
that finished just before the list opened still arrived after it and
closed it at once, with the trigger exactly where it had been measured.

The Provider step now grows tall enough to scroll once the key explainer
and the compatibility-mode hint are both on it. Scrolling the picker back
into view and opening it in the same frame, which is what a Playwright
click does, shut the list before an option could be chosen. Each change
passed on its own; the e2e suite failed only with both merged.

The list now closes on a scroll only when the trigger has moved. A resize
still closes it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yujiezhang-ops
yujiezhang-ops merged commit 2f7dbdb into claude/compat-mode-flow Nov 20, 2026
4 checks passed
@yujiezhang-ops
yujiezhang-ops deleted the feat/first-task branch November 20, 2026 06:16
yujiezhang-ops added a commit that referenced this pull request Nov 20, 2026
…268)

* feat: report operation results without moving the page

Replace the notices written into page bodies with a receipt overlay in the
top right of the content area (docs/ui-interaction-plan.md):

- FeedbackProvider, FeedbackViewport and ActionButton; launch, save, apply,
  delete and import results across Overview, Providers, Profiles, Agent
  profile, Compatibility mode, Settings, MCP and Skills now report through it
- MCP and Skills no longer fail silently: read failures are told apart from
  empty lists, apply is held while running, and a Skill delete is removed
  from the list only after the backend confirms it
- New launch error codes (LAUNCH_DIRECTORY_INVALID, TERMINAL_NOT_FOUND,
  TERMINAL_LAUNCH_FAILED) with localized copy; closing the Skill import
  picker is no longer reported as a failure
- The legacy-migration banner becomes a one-time receipt

Also includes the per-Agent compatibility-mode flow and the UI friendliness
pass already on this branch, which touch the same files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: plan switching Agents back to their official login

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: drop a link to a plan that is not in the repository

ui-interaction-plan.md linked to status-dot-ui-plan.md, which exists only
in a local checkout and has never been committed. The link was broken for
everyone else and failed the Docs check on every pull request based on
this branch. The sentence stays; only the link goes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* test: wait for the saved state, not the save in flight

The Claude Desktop e2e test asserted that the "save changes" button was
disabled after clicking it. That button is only disabled while the request
is in flight; once the address is saved and nothing uses compatibility
mode, the primary action becomes "turn on compatibility mode" and the
button the test looked for no longer exists. A save that finished before
the first poll failed the test, and the next test with it, since it relies
on what this one sets up.

Assert the state the page settles in instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix: keep Marketplace search text typed just before opening a card (#266)

The search box writes its text to the URL after a 180ms debounce. Opening
a card inside that window unmounted the page, the cleanup dropped the
timer, and the detail page went back to a URL without the search text.

Commit the pending text before navigating to a card, and fold it into
filter and history URL writes so neither write overwrites the other.
URL writes now build on the latest written params rather than on the
last render, which also closes the gap between a write and its render.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

* feat: suggest compatibility mode on the Provider step before any test (#265)

The wizard only mentioned compatibility mode after a connection test had
failed, and that test is optional. A first-time user who picked Codex with a
model service that has only confirmed Chat Completions, and skipped the test,
installed an Agent that failed on its first request.

The Provider step now reads the built-in protocol table and offers
compatibility mode up front when the Agent's protocol is not
`implementation-supported` on the selected Provider while `openai` is. No
request is sent to decide this.

- Parse `protocols` from providers.lock.json, validate its levels, and carry
  it on the Provider DTO; a custom Provider has no table and gets no hint
- The hint says support is unconfirmed, not absent, and is optional: the
  user can continue without it. A connection test that really fails still
  requires choosing compatibility mode or another service
- A choice made without a test survives typing and saving the key, which
  used to reset it; one made after a failed test is still discarded with the
  verdict it rested on
- Regenerate the Wails bindings and update the frozen status fixture

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

* feat: explain what an API key is on the Provider step (#263)

The step asked for an API key without saying what one is, where it comes
from, or who charges for using it.

A Provider with no saved key now shows three lines under the field: what
the key is, that "Get an API key" opens the Provider's own page, and that
connection tests and Agent calls are real requests billed by the Provider.
The billing line gives no amount and no estimate, because the price is the
Provider's to state.

The second line is dropped when the Provider publishes no key page, since
it names a button that is then absent. Nothing is shown once a key is
saved.

Refs #258

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

* feat: show the machine and pre-select an Agent on a first run (#262)

* feat: show the machine and pre-select an Agent on a first run

The Agent step opened with nothing chosen and nothing said about the
machine, so a new user met a list of eleven products and a disabled
Continue button.

A first run now arrives with WorkBuddy selected on the desktop tab, which
stays the default tab. It is only a starting point: any other row can be
picked, a status refresh does not put it back, and a machine that has been
set up before gets no pre-selection.

Above the list, a summary names the system, each runtime and how many
Agents are installed. A missing runtime says whether the current choice
needs it, because a desktop Agent needs none and a bare "not installed"
would read as a fault.

Refs #258

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* test: wait for the saved state, not the save in flight

The Claude Desktop e2e test asserted that the "save changes" button was
disabled after clicking it. That button is only disabled while the request
is in flight; once the address is saved and nothing uses compatibility
mode, the primary action becomes "turn on compatibility mode" and the
button the test looked for no longer exists. A save that finished before
the first poll failed the test, and the next test with it, since it relies
on what this one sets up.

Assert the state the page settles in instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

* feat: offer a first task after Codex or Claude Code installs (#264)

Also keeps a select open through a scroll that did not move it: with the key explainer and the compatibility-mode hint both on the Provider step, the e2e suite could not choose a Provider.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* test: compare working directories with symlinks resolved

The inherited-directory half of TestOSRunnerStartsInTheContextWorkingDirectory
compared the child's directory with os.Getwd() as text. A checkout reached
through a symlink, such as one under /tmp on macOS, reports the link from
Getwd and the target from the child, and the test failed there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix: report a first run until the user has stored something

firstRun was "~/.bootagent does not exist". The real runner logs every
command under ~/.bootagent/logs, and the app runs the region probe at
startup and version probes inside each status read, so that directory
existed before the first status was answered. On a new machine the real
app therefore never reported a first run and never opened onboarding.

No test saw it: a build with an injected runner is not logged, which
covers every unit test and the whole e2e suite. It showed up running the
non-e2e server build against an empty home.

firstRun now means nothing but the command log and the marketplace cache
is in ~/.bootagent. A stored setting, Provider, Profile or anything else
ends it, as before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant