Repository navigation
feat(desktop): tutorial guided steps: one Next, prompts, glows, live-view ticks, PR detection - #3380
Conversation
janicduplessis
left a comment
There was a problem hiding this comment.
Fresh review of f55829e (issue #3366 a-h, diff vs origin/main, tests, guide, website, README).
Checks run: swift build --build-tests -Xswiftc -warnings-as-errors + swift test --skip-build --filter Tutorial (51 passed), generate-tokens.mjs --check, check-ascii.mjs, format.sh --check (all clean), pnpm test packages/stim-cli/src/__tests__/guide.test.ts (97 passed). No needs-human category applies.
Actionable findings:
apps/desktop/Sources/StimDesktop/Views/DeviceViewer.swift:304-306-TutorialViewerCardwas inserted between the/// Re-renders its content as the replay starts or stops...doc comment andReplayingContent(now line 330), so that comment now documents the wrong type. Move the card belowReplayingContentor move the comment back onto it.apps/desktop/Sources/StimDesktop/Views/DeviceViewer.swift:143(card at ~306-326) -TutorialViewerCardis overlaid on the canvas top-left and is hit-testable. In a narrow viewer, or a non-fit scaling mode where the device fills/scrolls past the canvas, it sits over the device screen and swallows clicks there, which is exactly what the device step asks the user to do. The card has no controls; add.allowsHitTesting(false).packages/stim-cli/src/guide/agent.ts:400- the topic list still saysstim guide tutorial # tutorial sections and manual commands; themanualsection is removed in this PR.website/docs/desktop.md:100-101- App Logs is listed before Agent Actions and Replay, butTUTORIAL_STEPS/TutorialSteps.allorder is device, agent, logs. Swap the two bullets.apps/desktop/README.md:1868- "The commands include that name." refers to the step command lists this PR removes. (The surrounding Add Remote Machine paragraph describes a step that is not inTutorialStepsat all; that is pre-existing, out of scope here.)
Looked at and fine: next done/skipped via finished (only the current step is evaluated, consistent with auto-advance); agent step does not auto-advance and counts actions from startedAt; device ticks accept either tutorial simulator while actions/replay ticks are tour-only; share completes on worktree.pullRequest of the tour (fork PRs are kept by selectPullRequest / localRemoteRepos already on main); glow target selection (onPage vs global launch notice / archived filter), Show Me gating and TutorialGlow restart key; launch-notice anchor keyed on device-launch:; no remaining references to tutorialCommands, commandsExpanded, Mark Done or Skip Step; guide run text matches #3367's screenshot flow and the website summary. The new guide contract test asserts testIDs and the open command, which is a real contract.
… docs with the removed manual section Refs #3366
janicduplessis
left a comment
There was a problem hiding this comment.
Fresh review of fd45335 (diff vs origin/main). Review is clear.
The five findings from the previous review are fixed in fd45335:
- The
ReplayingContentdoc comment inDeviceViewer.swiftis back onReplayingContent. TutorialViewerCardhas.allowsHitTesting(false), so taps reach the device screen.agent.tstopic line no longer mentions manual commands.- In
website/docs/desktop.md, Agent Actions and Replay now comes before App Logs, matchingTUTORIAL_STEPS. - The stale "The commands include that name." is gone from the README.
Checks run: swift build --build-tests -Xswiftc -warnings-as-errors, swift test --skip-build --filter Tutorial (51 passed), generate-tokens.mjs --check, check-ascii.mjs, format.sh --check (all clean), pnpm test packages/stim-cli/src/__tests__/guide.test.ts (97 passed).
Reviewed with no findings:
TutorialProgress.next: it records done for a step infinishedand skipped otherwise.finishedis refreshed for the step being evaluated, from completion or from all non-optional ticks being done.- Viewer events: the device step accepts either tutorial simulator. Actions viewed and replay played are accepted only for the tour simulator.
- The agent step never auto-advances. It shows the "No agent actions" detail from logs since
startedAt. - Share completes on the tour's
worktree.pullRequestand shows the link. TutorialHint.targets: the first anchor on screen wins, and it is global for the launch notice and the Archived filter. Otherwise it requires the selected page. Show Me is gated byoffersShowMe.- The glow restarts when its target key changes.
- The launch notice anchor is keyed on
device-launch:. - RootView
openBuildnavigates and focuses the iOS device. - Nothing still references
tutorialCommands,commandsExpanded, Mark Done, Skip Step orstim guide tutorial manual. - The run guide's agent-device text matches the new contract test.
- The tests target real seams.
No needs-human category applies.
Description
The Desktop tutorial asked people to read more than act: every step carried a commands disclosure and both Skip and Mark Done, the parallel change had no prompt, the agent never exercised the app so Agent Actions often had nothing to show, the Live View ticks only counted the first change's simulator, Share could not tell a PR was opened, and Make a Change did not point at the launch notice. This PR reworks the steps, one commit per item from #3366.
Solution
TutorialStep.commands,tutorialCommands()and thetutorial.commandsExpandedpreference are gone. The CLI step command lists only fedstim guide tutorial manual(and the finish section), so the merge with docs: tutorial share step with before/after screenshots and a template PR body #3367 drops them and themanualsection too; finish now spells out its seven commands inline. The website no longer linksguide tutorial manual.donewhen the step's non-optional ticks are all done or its checkpoint completed, elseskipped. Detected steps still advance on their own; Restart keeps its confirmation.{tour}and{second}. Share stays one PR from{tour}.stim guide tutorial runnow tells the agent, next to docs: tutorial share step with before/after screenshots and a template PR body #3367's before/after screenshots, to taptap-button, toggledark-accent-switch, type inname-inputand screenshot, re-snapshotting before each action.stim guide agenthas no "agent-device not installed" path, so the guide usesagentDevice.installedfromstim status --jsonand falls back to the build result plusstim logs --errorswithout installing anything.tutorialDeviceTicksTheSecondChangesLiveViewToo). I could not reproduce a failure on the first simulator itself. The glow goes to the tile's Control label, then the viewer's screen ("Tap the Tap me button and watch the counter"), and the step auto-advances with both ticks. Because the viewer is a window-sized sheet, a small floating card inside it shows the step line and both ticks; it needs no layout change to the viewer and the panel is simply there again on close.stim statusreportsworktree.pullRequestfor the first change's worktree. Fork PRs are covered:selectPullRequestkeeps a cross-repository PR whose head repo is one of the checkout's remotes, and the share guide adds the fork as theforkremote (packages/stim-cli/src/workspace/pull-request.tslocalRemoteRepos). The status cache refreshes at most every 5 minutes, so the tick can lag. Any state counts, since the tutorial bot closes the PR. The prompt keeps docs: tutorial share step with before/after screenshots and a template PR body #3367's wording.Test plan
Dev Desktop from this worktree via
stim macos(real~/.stim; a scratchSTIM_HOMEbundle under/private/tmpcannot be resolved by LaunchServices, so agent-device could not open it), driven with the patched agent-device and--surface app, on a scratch tutorial clone in my scratchpad (never~/stim-tutorial*). I seeded the dev app's owntutorial.progressdefault with a freshbeginrecord to open the panel, since the Help menu is not reachable through the native backend. I acted as the agent: cloned,stim doctor, two worktrees,stim ios --remote local --remote-build local, then the run section's agent-device checks on the tour simulator.stim logs --source agenton the tour listed the open, wait, screenshots, presses, fill and snapshots;stim logs --errorsfor the dev app was empty.Not exercised live:
tutorialShareCompletesWithAPullRequestFromTheFirstChangesWorktree.Fixes #3366
Closes #3154