You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6828ef1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(onboarding): scope gateway events, guard the catalogue, fix Marker Guard
Marker Guard was red on `3875d00`, and the root cause was in the comment that
warns about this exact trap: the prose at `cli/cmd/tui.ts` spelled the closing
marker out literally, and the parser matches that token in comment text — so the
enclosing region closed on that line and everything after it was reported as
unmarked. Reworded, plus start/end pairs added around six multi-line additions
that only carried a single-line marker. `analyze.ts --markers --strict` is clean.
The four remaining findings from the class-scoped `codex` sweep, all of which
this PR introduced (none of these symbols exist at the merge-base):
- `plugin/altimate.ts`: gateway events fired for every `authorize()`, so routine
`/auth`, `/connect` and reauthentication all emitted onboarding-taxonomy
events. They could not be gated on `funnelStarted` because the flow runs in the
worker and the funnel opens on the main thread. The TUI now tells the worker
through a new `onboardingStarted` RPC, and the four emits are gated on it. In
`serve` / `run` / `github` there is no first-run funnel, so they correctly stay
silent.
- `plugin/altimate.ts`: the per-attempt outcome latch was a boolean, so two
callbacks exchanging the same one-time token let the one that failed fast claim
it and report `gateway_auth_failed` while the other saved valid credentials —
connected user, failed funnel. Tri-state now; success is authoritative.
- `dialog-model.tsx`: the catalogue had no submit latch (`DialogSelect.submit()`
has none of its own) and recorded the choice before awaiting an async provider
action, so a second Enter emitted `provider_selected` twice and started a second
authorization flow. The curated picker has this latch; the catalogue did not.
- `dialog-model.tsx`: the "Other" row recorded a selection before
`promptCustomProviderID()` resolved, so cancelling that prompt still produced a
`provider_selected` classified as `other` with no provider behind it.
- `dialog-provider.tsx`: `firstRunActive` had no clear on the one path where the
user is genuinely onboarded but `markSetupComplete()` never runs — gateway
connected with no usable model. Added `clearFirstRunActive()` as that
catalogue's close handler. Ordinary dismissals deliberately keep the flag: a
user who has set nothing up is still mid-first-run.
Not addressed, and not ours: per-session `Telemetry.shutdown()` is unsafe with
concurrent sessions (session A's shutdown disables telemetry under session B).
`Telemetry.shutdown` in `session/prompt.ts` predates this branch.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018SLUQF3xgZHsGZHSjxe7vb
0 commit comments