Repository navigation
feat(dashboard): add project-city, the project report as a 3D city - #20030
chenmingwei23 wants to merge 1 commit into
Conversation
2760984 to
c1d38c8
Compare
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that [DESIGN-REVIEWED] 9f9e7b7 Description read[DESCRIPTION-READ] 2c1965aed2ec71424716154e96e8878733a6f2bdf2ea4466d360b4b831fbeb33 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The city ships inside the wheel as a 654 KB built-in with a vendored three.js and its own CI job. The existing operator's-own-page route was never weighed. Not justified as shipped
What this change shipsInventory (7 items) — 6 justifiedIntent: give a person running several workstreams the project report as one animated 3D picture. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 9f9e7b7 Description read[DESCRIPTION-READ] 1722c7e9cc0ae4f2ac1f831dc3364b60fecbbdffd6287b79e2977d0cdbf94d7a That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS People who aren't engineers can't follow the city's numbers or its words: counts don't reconcile, statuses are hard to tell apart, and lanes, rounds and the centre ring go unexplained. Watch
Suggestions
[UX-REVIEWED] 9f9e7b7 Description read[DESCRIPTION-READ] 8e08f155f2bc50dc4389fe799745ccc132df775f3e10d691474f9941c1fea648 That sha256 names everything this verdict read: the PR description, plus the 13 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings that block the merge. FINDING — .github/workflows/ci.yml:202 — the [OPUS-REVIEWED] 9f9e7b7 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
c1d38c8 to
ae49d4c
Compare
|
|
|
|
|
|
|
|
|
|
74050cb to
cd80252
Compare
|
Rebased: onto |
A new built-in Dynamic Dashboard page that draws a crewmate's work as an animated 3D city: each workstream is a district, each round a street, each task a tower whose height is its worker's credits, and each subtask an annex behind its task. The same record is drawn as text under the city, so a reader without WebGL loses the picture and nothing else. It binds project-report's seven fields from the same places and keeps that page's rules: an unreported cost is a dash, a cut list says how much it dropped, a worker that served two tasks is billed once, and a verdict older than the record reads as no word. A parity test mounts both pages on one sample record and holds the city's figures to the report's. Its Needs-you buttons post kirocrew-dashboard:act only. Its own words follow the reader's locale like the other pages, English by default and zh-CN from an I18N table; it is always dark, and still under prefers-reduced-motion. The city is drawn with three.js r134 (MIT), bundled from the npm package's own sources down to the classes the page uses, so it carries no loader and makes no request. scripts/build-project-city-three.mjs rebuilds that block from the pinned tarball and checks the committed copy; a test pins its sha256, and a path-filtered CI job runs the check whenever the page, the script or THIRD-PARTY-NOTICES changes. It makes two edits to three.js's text, both recorded in THIRD-PARTY-NOTICES: generateUUID's fallback draws from crypto.getRandomValues instead of Math.random(), and three links in its shader comments name the default branch as HEAD.
cd80252 to
9f9e7b7
Compare
|
span=507ef2e27fc5 Fixed in |
|
span=bafae6b54a43 The clipped label came from evidence older than the camera fit: shot-01 predates the default camera standing back until every district and its sign sit inside the free part of the canvas. The new wide shot shows "Weekly digest email" whole. Signs also hold 30 characters before an ellipsis, up from 18. At 430 px, a label smaller than 11 px on screen is hidden, as the new phone shot shows. |
|
span=080d11f6095e Fixed in |
|
span=47ba63c96614 Fixed in |
|
span=f3ab0228c9b4 Fixed in |
|
span=5b7574701a1f The alert is a required gate here. CodeQL is one of the workflows PR Readiness waits on ( |
|
HOLD at 9f9e7b7. The lanes reran on this head after the last round of dispositions, which target cd80252. These current-head items have no reply yet:
What would clear this: one disposition per item on this head, plus the maintainer ruling on placement. The new CI job uses no secrets, sets persist-credentials false and installs with --ignore-scripts. Checks on this head are green. I ran nothing locally. — crew-pr-reviewer (r100) |
iamwhatever
left a comment
There was a problem hiding this comment.
Should we ship these templates out? I think they are more for personal usage. Our default templates are not what we shall chase, but encourage users to build their own ones.
|
Thanks @iamwhatever, agreed. This page fits better as one a person builds for their own dashboard than as a built-in, so I'm closing this PR. Putting a crewmate-written page live without a built-in is tracked in #20354. The branch stays in case we want it later. |
Pull request was closed
Problem / Motivation
Goal: Ship a built-in Dynamic Dashboard page that draws the project report as an animated 3D city, with the same numbers and rules as
project-report. Its own words are English by default and follow the reader's UI language, like every built-in page.Every built-in page today is cards and tables. None shows a crewmate's whole body of work in one picture, and the feature's owner asked for a younger, animated 3D version of the project report.
Why it matters
A person running several workstreams reads all of them at a glance: a district per workstream, tower height for spend, colour for state, a beam over anything waiting on them. Every number is still the record's, so the picture never says something the report would not.
Not a goal
project-report, to the default page, or to any other built-in.project-report's own seven.What changed (motivation → approach → change)
dashboard_templates/builtin/project-city/manifest.jsonitems,omitted,series,last_entry_atfrom theworkstreamsfold andfor_you,verdict,cias crewmate-written, inproject-report's exact shapes,verdict.wordsincludeddashboard_templates/builtin/project-city/template.htmlscripts/build-project-city-three.mjsthree@0.134.0tarball and checks the committed copy byte for byte;--writereplaces it.github/workflows/ci.yml,docs/ci/ci-and-reviews.mdproject_city_threepath filter and an advisoryproject-city-threejob that runs the rebuild check only when the page, the script or the notice changesTHIRD-PARTY-NOTICESdashboard_templates/builtin/README.md,docs/feature-map/README.mdMotivation. The owner signed off on a local demo of this city and asked for it as a real page: no style name anywhere, the report's content, motion kept.
Approach. The page reuses
project-report's field contract, so a crewmate can switch pages without rewriting a value, and ports its four rules: an unreported cost is a dash (a hollow dashed tower), a cut list says how much it dropped, a worker serving two tasks is billed once, and a verdict older than the fold's last entry reads "No word yet". A parity test mounts both pages on one record and holds the city's figures to the report's.Its own words follow the reader's locale like every built-in: English by default, zh-CN from an
I18Ntable, record values as written, and a crewmate'sverdict.wordsover the desk words. The locale suite holds every built-in to zh-CN, and the review contract forbids loosening that rule for a new page.The frame blocks the network, so three.js is inlined, bundled from the package's
src/down to the classes the city uses, because the published build's loaders holdfetch(andDOMParser(465 KB of a 646 KB page; the ceiling is 1,000,000 bytes).scripts/build-project-city-three.mjsis the recipe, a test pins the block's sha256, and a path-filtered CI job reruns the recipe and fails unless the committed block is that rebuild. The script edits three.js's text twice, both recorded in the notice:generateUUID's fallback draws fromcrypto.getRandomValuesinstead ofMath.random(), which code scanning flags behind every object'suuid; and three comment links name the default branch asHEADfor the inclusive-language scan.Change. The page renders on load and on each host push, and rebuilds the scene only when what it draws changed (the reader's language included), so the camera stays where the reader left it. Every value reaches the page as text. Its one message out is
kirocrew-dashboard:act. It draws one still frame underprefers-reduced-motion, stops while hidden, and without WebGL says so while the text half stands. It is always dark, in solid fills and fixed state colours shared by scene and HTML, because emissive light only reads on a dark ground; that is the one place it skips the theme variables.cinames no upkeep helper, because a helper ships beside one template.A picked workstream shows only its own record: every card counts its board and the boards under its tasks, as its header does, and the crewmate's verdict and another pull request's lane board wait on the All view. Pills count open tasks, so they add up to All. The desk splits its total into workers and crewmate, the legend says it counts tasks, and Accepted says what its total counts. Chips name states, not actions. Rejected and abandoned share one closed look, and the two looks that need a person carry a ring in the legend as in the city. A narrow canvas stands the camera back so every district stays in frame, with the camera buttons under it.
Backwards compatibility
Compatible: a new built-in id beside the thirteen; no field, fold, route or default changes. One reach to know about: a crewmate whose slug is
project-cityand that adopted no page gets this page by the existing slug rule (instance.default_template_id).Removes nothing: the diff adds a page, its tests, its build script and its notes. The locale suite gains one probe, and every case it runs for the thirteen pages runs for all fourteen.
Tests
test/test_dashboard_template_project-city.py(new): the seven fields and their fold sources equalproject-report's, and all three written fields take its exact shapes; every written field carries upkeep and no helper; neither file names the style, in English or in the zh-CN table; both files are ASCII, with the zh-CN words as\uescapes; no network spelling; the page fitsMAX_PAGE_BYTESand passesvalidate_page; the only host message isactand the library posts none; the library is three.js r134 under its MIT banner; the block's sha256 is the one the build script pins; ci.yml's filter names the page, the script, the notice and the lockfile, and its job runs the check without--write; no object's uuid comes fromMath.random(); no CSS gradient; the notice is recorded; the reduced-motion block and every keyframe.test/test_dashboard_templates_builtin.py:project-cityjoinsEXPECTED_IDS, so the shared loader, fold-path, packaging and preview/apply cases cover it.website/src/test/projectCityPage.test.ts(new): the real script in jsdom over a deep-frozen read: no-WebGL fallback keeps the numbers, a dash for an unmeasured task and board, "1 reported no cost", cut tasks and cut boards counted, one worker billed once, a verdict stands or reads as no word bywritten_at, a Needs-you option posts exactly oneact, zh-CN words with record values as written, English under every other locale, a crewmate's desk words win, a push in a new locale redraws, a push keeps the chosen workstream and the drawer's focus, under one workstream the nested board's blocked task, the spend, the pill counts and no other workstream's verdict or lane board, the Accepted and desk counts saying what they count, state words on chips, one name per task state everywhere, tasks as the unit of In flight and Accepted, who fixes a failing lane in words, and the fills-only line under every card's buttons.website/src/test/projectCityParity.test.ts(new): both pages on the sample record give the same sentence, counts and the figures under them, spend line and every tree row, the same dashes, the same cut counts, the same verdict state standing and superseded, and the same sentence and tree under one workstream.website/src/test/dashboardTemplatesI18n.test.ts: fourteen built-ins, withproject-cityin the probes; no case is skipped for any page.Determinism, on this head:
Manual verification
Headless Chromium (Playwright 1.58, software WebGL) over two documents: the render harness from
scripts/render_dashboard_builtin.py, and the gateway's owndashboard_frame.compose()output with its CSP, bootstrap, frozen read and beacon. Both: 0 page errors, 0 console errors, no request but the file itself. Two frames 1.2 s apart differ with motion on and are identical under reduced motion, whose button then reads "Play motion". Hovering a tower shows its tooltip, a pill flies to one workstream, a tree row opens the drawer, and an option posts exactly oneact. At the side panel's 430 px there is no horizontal scroll, every district and its sign stay in frame with the camera buttons right under the city, and a touch screen's hint reads "drag to turn" with no ctrl. The composed page postedkirocrew-dashboard:readywithrefill: true; a posted refill moved Accepted from 7 to 8, flashed the changed row once and kept one canvas. With the locale set to zh-CN, the counts, the sentence, the legend, the canvas label, the district signs and the view buttons are Chinese, and the workstream and task names stay as the record wrote them. Over an empty record the page reads "No workstream yet" with its hint and draws an empty plaza. In a browser started with WebGL turned off, the canvas says so in one line and every count, card and tree row stays.Screenshots / video
The sample is a made-up English project. Wide, all workstreams:
Hovering a tower:
One workstream picked from the pills; only its own record shows:
A zh-CN reader:
The side panel's 430 px width:
A walk through the city turning, two views, one workstream, the tree and the drawer:
walkthrough.webm
A crewmate with no work yet:
A browser with WebGL turned off:
Reduced motion, the drawer, and the whole page
Related Issues
Closes #19998
Related: #18642, #18755
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)