Skip to content

fix(desktop-windows): wire AutoCreatedTasksStep as step 14 of onboarding - #12229

Merged
kodjima33 merged 2 commits into
BasedHardware:mainfrom
formed2forge:fix/windows-onboarding-autocreated-tasks-step
Sep 6, 2026
Merged

kodjima33 merged 2 commits into
BasedHardware:mainfrom
formed2forge:fix/windows-onboarding-autocreated-tasks-step

Conversation

@formed2forge

@formed2forge formed2forge commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • TOTAL_STEPS was 14 but step 14 was unreachable: handleGoal and GoalStep.onSkip both called finishToChat() directly, bypassing next(), and AutoCreatedTasksStep was imported but never referenced by renderStep.
  • Bump TOTAL_STEPS to 15, route handleGoal + GoalStep onSkip through next(), add explicit step===13 case for GoalStep and step===14 default case rendering AutoCreatedTasksStep, add finishToTasks() for the tasks-route completion path.

Verification

node_modules/.bin/vitest --run src/renderer/src/pages/Onboarding.test.tsx
✓ 3 tests pass
  - GoalStep onContinue → step 14 (AutoCreatedTasksStep rendered, completeOnboarding not called yet)
  - GoalStep onSkip → step 14 (same)
  - AutoCreatedTasksStep onFinish → setPendingRoute('/tasks') + completeOnboarding

Cannot exercise the live UI path (no app build in this environment); tests cover the full onboarding state machine through the wizard's public handler surface.

Failure-Class: none

🤖 Generated with Claude Code

https://claude.ai/code/session_01KADKRuaPJdho9CDE7nLXQP

Review in cubic

@Git-on-my-level Git-on-my-level added needs-rebase PR has merge conflicts / is behind main and needs rebasing windows Windows desktop work labels Aug 26, 2026

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @formed2forge — the diagnosis here is spot-on, and the fix itself is small, correct, and well covered. The only blocker is branch hygiene, not your code.

The fix (verified against desktop/windows/src/renderer/src/pages/Onboarding.tsx at head):

  • TOTAL_STEPS 14 → 15 and next() now clamps to step 14, so the previously unreachable step actually renders. I confirmed current main still has TOTAL_STEPS = 14 with handleGoal calling finishToChat() — the bug is real and not yet fixed upstream. Nice catch.
  • handleGoal and GoalStep onSkip now go through next() instead of short-circuiting to finishToChat(), and the dead finishToChat is cleaned up in the follow-up commit.
  • renderStep gains the explicit step === 13 case for GoalStep, with the fall-through rendering <AutoCreatedTasksStep onFinish={finishToTasks} />, which routes to /tasks via setPendingRoute + completeOnboarding() — matching AutoCreatedTasksStep's own "Take me to my tasks" CTA.
  • Onboarding.test.tsx covers all three transitions (continue → 14, skip → 14, finish → /tasks + completion) with the step components mocked — a genuinely useful regression suite for the wizard's state machine.
  • The changelog fragment 2026-08-onboarding-autocreated-tasks-step.json matches the behavior change.

What needs to change — the branch, not the code:
This PR shows 205 changed files (+6905/−3378), but only 3 of them are yours. I compared every file at the PR head against current main: 157 are byte-identical to main today, and 40 more match older snapshots from main's own history (e.g. backend/AGENTS.md, backend/charts/monitoring/README.md, .github/workflows/gcp_backend.yml — the branch carries earlier versions of files main has since moved forward). Your branch merges an upstream snapshot that is now 152 commits behind, and GitHub reports the PR as conflicting, so it cannot merge as-is.

Could you rebase onto current main — or open a fresh branch from main containing just your two fix commits — so the PR shows only your 3 files? One detail to leave behind while rebasing: the added 2026-08-17 line in .github/guardrail-pulse-history.jsonl also rides along with the stale history rather than belonging to this fix; please drop it so the PR stays scoped to the onboarding change.

Once the diff is just the onboarding fix, this should be a quick maintainer pass to land — the change itself needs no product decision, only the rebase.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@formed2forge
formed2forge force-pushed the fix/windows-onboarding-autocreated-tasks-step branch from f15d0ca to 421ab31 Compare August 26, 2026 13:34
@formed2forge

Copy link
Copy Markdown
Contributor Author

Rebased onto current main — PR now shows 4 files (the 3 onboarding fix files + changelog fragment). The guardrail-pulse-history line is gone. Mergeable.

@Git-on-my-level
Git-on-my-level dismissed their stale review August 27, 2026 03:13

Dismissing my earlier changes-requested review — it was solely about branch hygiene (the branch carried a stale upstream snapshot showing 205 changed files and GitHub reported conflicts). The branch has since been rebased onto current main: verified mergeable at head 421ab31, with only the onboarding fix files remaining.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level

Copy link
Copy Markdown
Member

Rebase verified — thanks @formed2forge, this is exactly what was needed.

Confirmed at the current head:

  • The PR is now mergeable and down to 4 files, with the three onboarding files as the only real changes (Onboarding.tsx +17/−13, the new Onboarding.test.tsx regression suite, and the changelog fragment).
  • One note on .github/guardrail-pulse-history.jsonl: the file at the PR head is byte-identical to main's copy — main independently received the same 2026-08-17 baseline line — so it's a no-op for the merge even though the diff view still lists it against the older merge base. Nothing more to change there.
  • The needs-rebase label had gone stale, so I removed it and dismissed my earlier changes-requested review, which was only about branch hygiene.
  • Re-checked the fix itself: TOTAL_STEPS 15 with the explicit step === 13 GoalStep case and the AutoCreatedTasksStep fall-through matches the component's onFinish / "Take me to my tasks" contract, and the three new tests pin continue→step 14, skip→step 14, and finish→/tasks + completion — nicely done exercising the real tasks step rather than stubbing it. Typecheck · Lint · Test and the Windows build smoke both pass at head.
  • One tiny non-blocking nit for a future pass: the tests use bare expect(screen.getByText(...)) statements; explicit matchers (e.g. toBeInTheDocument) would give clearer failure output.

From my side this is ready — the change itself needs no product decision, so leaving it for a maintainer to merge.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added positive-signal Automation verified a genuine fix/quality contribution and removed needs-rebase PR has merge conflicts / is behind main and needs rebasing labels Aug 27, 2026
@formed2forge

Copy link
Copy Markdown
Contributor Author

Rebased and verified correct — 4 files (3 onboarding + changelog). Ready for maintainer merge sign-off.

@formed2forge

Copy link
Copy Markdown
Contributor Author

All CI checks pass and the rebase is clean. Pinging for maintainer review/sign-off.

@formed2forge
formed2forge force-pushed the fix/windows-onboarding-autocreated-tasks-step branch from 421ab31 to 52c382c Compare August 27, 2026 19:04
@formed2forge

Copy link
Copy Markdown
Contributor Author

Rebased onto upstream/main — branch is now 3 changed files (was 205 stale). The dead finishToChat removal cherry-pick completed cleanly. Ready for review.

@Git-on-my-level

Copy link
Copy Markdown
Member

Verified at the current head (52c382c) after the final rebase — the branch-hygiene churn is gone and the diff is now exactly the three onboarding files. Per-file notes:

  • desktop/windows/src/renderer/src/pages/Onboarding.tsx — the fix checks out end-to-end: TOTAL_STEPS 14→15 makes step 14 reachable, handleGoal and GoalStep.onSkip now advance through next() instead of short-circuiting straight to completion, the step === 13 case renders GoalStep with the default case rendering AutoCreatedTasksStep, and the new finishToTasks() (setPendingRoute('/tasks') + completeOnboarding()) matches the pending-route handoff that preferences.ts and App.tsx already implement. I also confirmed /tasks is a real shell route (routes/manifest.ts), and that resuming is safe across the step-count change: clampOnboardingStep clamps a saved step into [0, 14], so nobody gets stranded. One tiny nit, non-blocking: the handleGoal comment still says "delay the transition into Chat" — the transition now goes to the tasks step.
  • desktop/windows/src/renderer/src/pages/Onboarding.test.tsx — good regression suite: it pins all three fixed bugs (GoalStep continue/skip must reach step 14 without completing onboarding, and the tasks step's finish must call setPendingRoute('/tasks') + completeOnboarding() exactly once). The stubs are scoped to the wizard's collaborators, which is the right isolation level here.
  • desktop/windows/changelog/unreleased/2026-08-onboarding-autocreated-tasks-step.json — matches the sibling fragment format.

One behavior change worth a maintainer's eyes: first-run completion now lands on /tasks rather than /chat. This is exactly what the pre-existing AutoCreatedTasksStep component and the pending-route plumbing were built for ("Take me to my tasks" → /tasks is spelled out in preferences.ts), so it reads as completing an intended design rather than new direction — but the earlier rebase verification was on a prior head, so this final rebased head just needs one last maintainer sign-off before merge.

Thanks @formed2forge — the diagnosis (the goal step short-circuiting past an unreachable final step) was exactly right, and having the test suite document the bugs it caught is a nice touch.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@cursor
cursor Bot force-pushed the fix/windows-onboarding-autocreated-tasks-step branch from 52c382c to 91fd6a8 Compare September 2, 2026 03:09
@Git-on-my-level

Copy link
Copy Markdown
Member

Verified the 09-02 rebase at 91fd6a82: content unchanged — all three changed files are byte-identical to the 52c382c head verified in my earlier comments, so that per-file analysis carries over unchanged. Checks are green at the new head (Typecheck · Lint · Test, Windows build smoke, Hygiene) and the branch is mergeable with no conflicts; the only gate left is the required maintainer review.

Nothing further needed from you, @formed2forge — thanks for keeping the rebases tidy through the churn on main. From the automation side this is done; it just needs a maintainer's merge sign-off.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

Tim and others added 2 commits September 2, 2026 15:30
TOTAL_STEPS was 14 but step 14 was unreachable: handleGoal and GoalStep
onSkip both called finishToChat() directly, bypassing next(), and
AutoCreatedTasksStep was imported in dead code (never rendered by
renderStep).

Fix: bump TOTAL_STEPS to 15, change handleGoal + GoalStep onSkip to
call next(), add explicit step===13 case for GoalStep in renderStep,
add step===14 default case rendering AutoCreatedTasksStep, and add
finishToTasks() for the tasks-route completion path.

Verified: pnpm test -- Onboarding.test.tsx passes (3 new regression
tests covering onContinue→step-14, onSkip→step-14, finishToTasks route).

Failure-Class: none

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KADKRuaPJdho9CDE7nLXQP
@cursor
cursor Bot force-pushed the fix/windows-onboarding-autocreated-tasks-step branch from 91fd6a8 to 0712d83 Compare September 2, 2026 15:30
@Git-on-my-level

Copy link
Copy Markdown
Member

Verified at the new head 0712d830 — the only change since the 91fd6a82 verification is the dead finishToChat removal (+0/-5), and all three content files are byte-identical to what was previously verified, so the earlier per-file analysis carries over. The cleanup was the right call: nothing in the wizard routes to /chat anymore, and the route manifest redirects /chat → /home anyway, so that path was doubly dead.

For the maintainer sign-off, the product context that hasn't been surfaced in this thread yet:

  • This restores what 93dbeec0d4 ("simplify post-onboarding controls", 2026-07-23) deliberately removed — that commit made Goal the terminal step and dropped TOTAL_STEPS to 14.
  • The repo's mac-parity audit (desktop/windows/docs/mac-parity-audit/10-onboarding.md, re-audited 2026-08-22) subsequently classified that removal as a new Windows parity gap: Mac still ends on a tasks preview, Windows ended one step earlier on Goal, and AutoCreatedTasksStep was left on disk as dead code.
  • The pre-existing plumbing agrees with the restoration: preferences.ts's pending-route bridge documents exactly this use case ("Take me to my tasks" → /tasks), /tasks is a first-class panel in routes/manifest.ts, and Onboarding.tsx's own hideBrainMap list already treated step 14 as the auto-created-tasks screen even while it was unreachable.

So the decision to confirm at merge: the parity audit's direction (restore the tasks closing step) supersedes the July simplification. Everything technical is verified — the wiring, resume clamping (clampOnboardingStep into [0, 14] so nobody is stranded mid-wizard), regression coverage, and green checks at this head — what's left is purely a product call, not a code one.

Thanks @formed2forge — solid diagnosis, tight fix, and the dead-code cleanup commit on top was good hygiene.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added the needs-maintainer-review Needs a human maintainer to sign off before merge label Sep 3, 2026

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Small, well-tested desktop bug fix (wires AutoCreatedTasksStep as onboarding step 14/15, fixes the TOTAL_STEPS=14 unreachable-step bug) — diff is clean and CI is green. Capped at approve (not merged) per the standing formed2forge account-trust hold; would otherwise qualify for owner-override merge at 4/5 confidence.

@formed2forge

Copy link
Copy Markdown
Contributor Author

This PR is approved (kodjima33) and CI is green — no further changes needed. Could a maintainer please merge when you get a chance? Thanks.

@kodjima33
kodjima33 merged commit fc735a2 into BasedHardware:main Sep 6, 2026
33 checks passed
kodjima33 added a commit that referenced this pull request Sep 6, 2026
…anup (#12891) (#12892)

* fix(desktop): restore AutoCreatedTasksStep deleted by dead-module cleanup (#12891)

desktop/windows/src/renderer/src/pages/Onboarding.tsx still imports and
renders AutoCreatedTasksStep (step 14, wired in #12229), but
5701283 ("remove retired agent-runtime residue and dead-module
clusters") deleted the component and its test, misclassifying it as
dead. Any build or typecheck of desktop/windows on main has been
broken since (`npm run build` runs `typecheck` first, so
`build`/`build:win`/`build:linux`/`build:unpack` all fail before
bundling), confirmed by PR #12878 hitting TS2307 when it touched that
tree.

Restore both files verbatim from 5701283^ (the last commit where
they existed and matched Onboarding.tsx's usage).

* docs(failure-class): register FC-reachability-cleanup-deletes-live-reference

Companion to the fix in this branch: 5701283 deleted
AutoCreatedTasksStep.tsx as "dead" while Onboarding.tsx still imported
and rendered it, breaking desktop/windows typecheck and every build
variant. No existing failure-class definition covers a cleanup's
reachability scan missing a live reference, so this registers a new
one per pr-preflight's failure-class-protocol.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-maintainer-review Needs a human maintainer to sign off before merge positive-signal Automation verified a genuine fix/quality contribution windows Windows desktop work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants