Repository navigation
Document the desktop in full and count every new button - #2354
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📸 Screenshot drift checkNo drift: the committed screenshots already match a fresh deterministic generation. ✅ |
maniator
left a comment
There was a problem hiding this comment.
Stand-in review (Copilot, Codex and PR-Agent down) + /bmad-code-review, head 489a7ec
Codex failed on this head (usage limit) and Copilot and PR-Agent are out of credits, so this is the stand-in-pr-review run plus the bmad-code-review layers (Blind Hunter, Edge Case Hunter, Acceptance Auditor, Hot-Path Auditor) in one lean pass. Routing: bmad (help site, analytics, UI plumbing; no engine, save or gameplay path).
What I checked
- Help text against the code and the live 4.6.0 desk: title-bar buttons per window (
deskWindow.tsadds _ to every framed window, □ only withcanMax, ✕ on tower/Map/Bulletin/Tower Info/Control Panel), double-click to maximize, the tower title (<name> - Verticopolis), Info's meters and buttons (index.html #topbar,desk.css), traffic labels and the· 12Ffloor,WD1time, the Verticopolis menu items and what the title screen leaves out (START_ITEMS, nocontrolPanelhandler,mb-closehidden), Shift+F10 / ContextMenu, arrows, Enter, Esc, every linked page and anchor. All correct apart from the two inline findings. - Analytics: every new code is in
AppActionName, the data map table,desk-windows.mdand the dashboard script; names follow the existingdesk_*/*_pickscheme; the relay has no action allowlist to update. Scripted title-button presses (ON_TITLE_SCREEN, deskstart) stay out oftitle_pickviaisTrusted; Continue reports once fromonContinue; a window-menu Close on the tower no longer double-counts; the help site's File > Play item is nota[data-game-link], sohelp_game_linkandhelp_menu_pick gamenever overlap; the relay usessendBeacon/keepalive, sobar_play/front_backsurvive the navigation or tab close. - Tests: the 8 touched suites pass locally (115 tests). They mock
analyticsActionsand assert the calls, and each would fail if its wiring were removed. - Version:
app: patch,crate: none, Player line present, no version edits. History: 2 logical commits.
Findings
| # | Severity | Triage | Where | Finding |
|---|---|---|---|---|
| 1 | medium | patch | desktop.mdx:141 (+ data map 196, titleScreen.ts:63, titlePicks.ts:14) |
On the desk, a click outside the title window does not continue; a click on the window's own empty face does. Inline. |
| 2 | low | patch | desktop.mdx:70, :67 |
The Info strip's one-time Install chip is missing; the 0 key is Pause, not a speed. Inline. |
| 3 | low | defer | src/ui/Onboarding.ts safeDismiss (pre-existing, #2336) |
On the desk, a click anywhere on the title window's empty gray face or its poster sky drops the player into their tower (Continue), because #splash is the window itself there. Probed on production: those points hit #splash. A safe action, but surprising for a click on artwork. Suggested fix: under body.desk-title, skip the click dismiss (Esc stays), or dismiss on a click on the desk outside the window. Needs a backlog row plus its mirrored issue, or fix it here if you'd rather not file. |
Optional, not blocking (one lens each): help_game_link wiring in Header.astro has no test of its own (only gameLinkDetail is tested); a middle-click on the title screen's Sponsor counts as sponsor_click but not title_pick; WindowMenu.show derives taskbar/title_bar from the above layout flag, so a future caller that opens upward from elsewhere would be misfiled (a named from argument would read better).
Hot-path record (section 6), commit 489a7ec, whole diff
| Item | Result | What was checked | Findings and resolution |
|---|---|---|---|
| HP-1 | clear | reportTitlePick (document capture click, every click in the page), trackDesk*/trackWindowMenu* (taskbar, tray, window menu, title-bar ✕ handlers), DeskController.changed/taskPressed, WindowMenu.show, DeskTaskbar.openMenu, DeskTitle.show, showTitleScreen.onContinue, Header.astro link listeners: all per-command (one player press) or once per page life; none reached from runFrame, the HUD tick or a step |
none |
| HP-2 | clear | no collection walks; titlePickOf is one closest() up the target's ancestors (DOM depth, about 20) per click |
none |
| HP-3 | clear | one detail string per press; no allocation per frame | none |
| HP-4 | n/a | no sorting added | none |
| HP-5 | clear | hasOwnProperty lookups on two constant 6–7 key objects |
none |
| HP-6 | n/a | no id lookups or removals added | none |
| HP-7 | clear | moved NAME table into deskAnalytics.ts unchanged; changed() rewrite keeps the first-move latch (same branches) |
none |
| HP-8 | n/a | no cache added, dropped or bypassed | none |
| HP-9 | n/a | no findings needing a remedy | none |
| HP-10 | clear | analytics only; the one behavior change (tower window-menu Close calls mb-close directly instead of the ✕) runs the same File > Close path, covered by deskController.test.ts |
none |
| HP-11 | n/a | no WASM, host or build change | none |
| HP-12 | clear | no per-frame or HUD-refresh work; the capture listener costs one ancestor walk per click and sends nothing off the title screen | none |
Nothing here gets slower: every added call sits on a player press.
Verdict: CONDITIONAL GO at 489a7ec. Conditions:
- Fix findings 1 and 2 (docs and two code comments only).
- Record finding 3 as a backlog row with its issue, or fix it in this PR.
- Rebase onto
main: it is 3 merges behind (#2342, #2345, #2351), which touchdocs/analytics-data-map.md,scripts/posthog-dashboard.mjsandsrc/analyticsAppActions.ts.git merge-treesays it applies cleanly. - CI green on the new head (e2e, test and screenshot capture were still running at review time).
The fixes make a new commit, so it needs a quick re-check from me before merge; if it only touches the docs and comments named above, the hot-path record carries.
Reviewed against Verticopolis conventions (.github/copilot-instructions.md).
Generated by Claude Code
The Desktop page now covers each window's title bar buttons, what the tower, Info, Tools, Map, Bulletin and Tower Info windows hold, the Info strip's meters and buttons, the Verticopolis menu item by item, the opening screen's buttons and taskbar, and the desktop's keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ms7trY5bPq1ye4TemCpsse
The 1994 desk and the title screen now report what each new button did: taskbar presses, the Verticopolis menu opening, the tray, window menus, the tower's and Control Panel's close buttons, the title window showing, each title-screen button (title_pick) and the manual's Play and Back to game links. The desk's codes move into deskAnalytics.ts, the data map and privacy page say what is counted, and the dashboard script gains the matching tiles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ms7trY5bPq1ye4TemCpsse
489a7ec to
5c4b586
Compare
maniator
left a comment
There was a problem hiding this comment.
Re-review (stand-in + /bmad-code-review), head 5c4b586
I read the diff from my last verdict's head (489a7ec) first. The branch is rebased onto main at d6a8367, and it is 2 commits with no fixup or merge-from-main commits. Comparing the PR's own diff before and after the rebase, only these changed:
help-site/src/content/docs/desktop.mdx: the Continue row now says only that Esc does the same. Info lists the one-time Install button ("File > Install app", which matches#btn-install-menuinsrc/index.html). Pause shows 0 and the speed row reads 1 to 3. Finding 1 and finding 2 fixed.docs/analytics-data-map.md, the dashboard tile description, and the comments intitleScreen.tsandtitlePicks.ts: they now say "a click on the title screen's empty background". The data map also explains what that means on the desk. This matches the production probe. Only comments changed, no code._bmad-output/implementation-artifacts/backlog.md: the rowdesk-title-click-continues(P3, issue #2355) is added. #2355 is open withbugandP3labels, and its body follows the bug form. Finding 3 recorded.
Both review threads are fixed in the code and resolved. The touched suites pass on this head (120 tests, backlog mirror test included). No new findings.
Hot-path record: the record from 489a7ec carries over. The fix round changed only docs, a backlog row and two code comments, and nothing that runs on a section 1 surface. I confirmed the rest of the PR's diff is unchanged by the rebase.
Verdict: GO at 5c4b586. CI was still running at review time (e2e, test, capture, smoke). As usual, merge waits until every required check is green.
Reviewed against Verticopolis conventions (.github/copilot-instructions.md).
Generated by Claude Code
Requested by Naftali · project thread
What & why
Naftali asked for the help site to cover the 1994 desktop from 4.6.0 (#2336) in full, and for every new button, title-screen buttons included, to report proper analytics.
Help site. The Desktop page (
help-site/src/content/docs/desktop.mdx) now explains:The privacy page now says buttons are counted along with menu commands and windows.
Analytics audit. Before this PR, these new buttons sent nothing, or could not be told apart:
desk_windowmin/restore, focus presses lostdesk_task<window>_front,_min,_restore(title_fronton the title screen)desk_start_opentitleortower, plus a funnel tile todesk_startmute)desk_traydisplayorsounddesk_win_menu_opentaskbarortitle_bar,desk_win_menu<window>_<command>desk_windowtower_close,control_panel_close(Map, Bulletin and Tower Info keep their own events)desk_title_shown, once per page lifetitle_pickcontinue(button, Esc or click outside),open,new,help,mute,install,sponsorhelp_game_linkbar_play,bar_back,front_play,front_backA menu that presses a title-screen button from a script (File > New… and Options > Sound on the title screen, the desk's Verticopolis menu) stays that menu's own
menu_pickordesk_startand never adds atitle_pick.isTrustedis how the listener tells them apart. The desk's codes now live insrc/ui/desk/deskAnalytics.ts, sodeskController.tsstays at the 500-line ceiling.docs/analytics-data-map.mddocuments every row, and so doesdocs/ui/desk-windows.md. It also gains a short section on the help site's events, which were missing from it.Dashboard.
scripts/posthog-dashboard.mjswidens "The desk: windows, taskbar and Control Panel" to the new codes and adds "The desk: Verticopolis menu opened to picked" (funnel), "Title screen: buttons pressed" and "Help site: Play and Back to game".Closes n/a (owner request in the project thread)
Type of change
Game mode impact
n/a: help pages and analytics only; no gameplay or simulation change.
Quality gates
npm run typechecknpm run lintnpm test(locally: the touched suites andsrc/tests; full run in CI)npm run build(CI)Versioning
.changesnote with the rightapp:andcrate:levels (app: patchfor the manual page,crate: none)Complexity
Hot paths and call frequency (tier), sizes, complexity before and after, remaining scans and why, caches kept or replaced (HP-8), invalidation evidence, measurements: n/a: not significant under section 5. Every new call runs on a single player press, never per frame or per tick.
wireTitlePicksadds one captureclicklistener to the document for the page life; each click does oneclosest()walk up the element's ancestors and one property lookup, O(depth), and sends nothing unless the click lands on a title-screen button. The desk handlers add one beacon call to presses that already ran a handler. No scan, cache or observer was added or removed.Hot-path record (section 6): pending the review thread's skill run on this PR.
Screenshots / recordings
None: the help page reuses the existing desktop screenshots (
docs/screenshots/features/desk-*.png), and no game UI changes visually. Its share card is unchanged, since the page's title and description are unchanged.Notes for reviewers
title_pickcontinueis sent fromshowTitleScreen'sonContinue, so it counts all three ways Continue happens. The delegated listener skips Continue on purpose so nothing is counted twice.mb-closedirectly instead of clicking the tower's ✕, so a menu Close is adesk_win_menutower_closerow and never also adesk_windowtower_close.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ms7trY5bPq1ye4TemCpsse