fix(web): make onboarding shortcuts easier to follow - #2770
Merged
Conversation
The showcase's assist button appeared only after 15s idle or two stray keypresses, so its arrival read as arbitrary, and "Show me" did not say that clicking it performs the action and advances. It is now always offered and labelled "Do it for me". Step 7 flattened a sequence and a chord into one keycap row, which reads as a single three-key press. The row now shows Tab alone until the end edge has focus, then swaps to the stretch chord; the copy also names the up and down arrows, since left and right do not stretch. Also: resolve Cmd/Ctrl in step 9's prose instead of leaking the raw "Mod" token, call the practice events "sample" rather than "real" since they are never saved, replace the "drop" verb for placing an event, and style the checklist's sign-up row as a real CTA instead of a read-only row.
Name the stretch phase instead of branching inside a JSX prop, and keep its keycaps in the steps module beside the rest of the lesson content, with the note explaining why that arrow stays literal: stretching reuses the Shift+Arrow family, and the arrow shows one direction of it. Drop the now-unreachable graduation arm of the assist handler, build the checklist's sign-up CTA through an early return so the row fragment is no longer assembled and discarded, and let the list item own its spacing. Give the tests one helper for jumping to a lesson rather than two ways of writing the same setup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First-run walkthrough surfaced several points of confusion in the Shortcut Showcase and the post-showcase practice checklist. This fixes them:
useShowcaseAssisthook (idle timer + document keydown listener) is gone; the button now renders on every step exceptgraduationand is labelled "Do it for me".Tab Shift ArrowDown), which reads as a single three-key press. The row now showsTabalone until the practice board's end edge has focus, then swaps toShift+ arrow. Body copy also names the up/down arrows, since left/right do not stretch.Analytics:
shortcut_showcase_assist_shownis replaced byshortcut_showcase_assist_used { step }, which fires on click rather than on reveal. Any insight built on the old event needs repointing. Worth stating as a deliberate trade: the old event was the only signal for "which step do people get stuck on", since it fired on the idle/failed-attempt inference. The new one measures a decision to hand the step over instead. If the struggle signal turns out to matter, time-on-step is derivable from the existingshortcut_showcase_step_completedevents rather than by restoring the hook.Simplicity
The change deletes the
useShowcaseAssisthook entirely (two constants, a 15s timer, a document keydown listener, three refs, and a state variable) rather than adding a config flag to it, so it removes per-keystroke work rather than adding any. NouseEffect,useRef, oruseStatewas added.A second commit (
refactor(web): tidy the onboarding hint and checklist rendering) applied the cleanup pass:isStretchPhasebinding above the return instead of a ternary buried in a JSX prop.showcase.steps.tsasSTRETCH_KEYCAPS, next to the rest of the lesson content, carrying the note that explains why that arrow stays literal: stretching reuses the Shift+Arrow family thatKEYMAP.moveEventbinds, and the arrow demonstrates one direction of it. (I checked whether the resize chord deserved its ownKEYMAPentry; it does not, because the real handler bindsKEYMAP.moveEvent.hotkeys.*for both moving an event and stretching a focused edge. Inventing an entry would have been fiction.)doItForMeswitch lost its unreachablegraduationarm. Falling through toadvance()is equivalent, sinceadvance()callsfinish()on the last step.showStep()helper instead of two spellings of the same setup.The two-phase hint deliberately does not become a general per-step phase model. Keeping the swap in the component preserves the reference identity that
keymap.test.tsasserts between step keycaps andKEYMAP, andresizeEdgewas added to that parity list now that its declared keycaps are a pureKEYMAP.edgeFocusreference rather than a hand-built array.Two cleanup findings were considered and skipped:
c-button c-button-primary. That utility hardcodesh-11, too tall for the compact checklist card, so adopting it means overriding the height it exists to set. The pill instead matches the app's established compact-CTA recipe used byWelcomeModal,AnonymousCalendarRow,CalendarListHeader, andTasksRemovalNotice. Worth noting the real cost: those compact pills hover withbrightness-110whilec-button-primaryhovers withbg-accent-hover, so a change to the accent-hover token will not reach any of them. That divergence predates this PR and deserves its own pass rather than a sixth variant here.ShortcutTipPartmodel thatshortcut-tips.data.tsalready uses). That would let step 9 render real chips inside the sentence and dropMOD_KEYentirely, but it reshapes how every step body renders, which is well outside this change.Automated validation
Full browser walkthrough of all 11 showcase steps plus the checklist on the local dev server:
Tabchip on entry; pressing Tab swaps the row toShift+ down-arrow. Body reads "the up or down arrow".Regression-guard check: temporarily reverting the phased-hint conditional makes the new
ShortcutShowcasetest fail, then restoring it makes it pass, confirming the test protects real behavior rather than asserting a tautology.After the refactor commit, the showcase was walked again in the browser from the welcome modal through step 7, confirming the hint still shows
Tabalone and swaps toShift+ down-arrow on Tab, and the checklist card still renders identically.Independent review
A fresh read-only reviewer was run against the final two-commit diff, given the worktree, base ref, task intent, and
AGENTS.md, but not the implementing agent's conclusions. It was pointed specifically at the refactor commit, since that restructured code after the first commit had already been validated.Result: no confirmed defects. It independently reached the same conclusions I verified by hand on the two paths worth worrying about:
keycapscan never be truthy for a step that declares none.isStretchPhaserequiresstepId === "resizeEdge", which does have keycaps, sograduationstill renders no chip row.graduationarm from the assist handler is not just safe but restores the original semantics: falling through toadvance()callsfinish()on the last step, which is exactly what that arm used to do.It also confirmed the checklist's
ul/listructure and the sign-up button's accessible name survive the restructure, thatshowStep()does not mask a regression (the component depends only onisActive/stepIndex, andbeforeEachalready resets whatstart()would), and that the keymap parity assertion is still truthful about the phase it covers.An earlier reviewer on the first commit was likewise clean. Separately, a four-angle cleanup pass (reuse, simplification, efficiency, altitude) produced the refactor commit above; its two remaining findings are the ones recorded as skipped under Simplicity.
Test plan
Two tests added to
ShortcutShowcase.test.tsx: the assist button's immediate availability and graduation swap, and the two-phase keycap hint.