@bongos/core 1.25.2 → 1.25.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/.bongos-core.json +55 -40
  2. package/docs/copy-inventory.md +30 -29
  3. package/docs/copy-registry.json +78 -58
  4. package/docs/module-api-changelog.md +4 -0
  5. package/docs/page-inventory.json +5 -3
  6. package/docs/page-readings.json +44 -44
  7. package/modules/hall-ui/public/builders.js +3 -27
  8. package/modules/hall-ui/public/genesis-home.js +54 -4
  9. package/modules/hall-ui/public/hall-render.js +5 -119
  10. package/modules/hall-ui/public/hall-widgets.js +3 -3
  11. package/modules/hall-ui/public/index-genesis-votes.states.json +61 -0
  12. package/modules/hall-ui/public/index.html +0 -7
  13. package/modules/hall-ui/public/shell-game.js +22 -4
  14. package/modules/hall-ui/public/style.css +3 -73
  15. package/modules/hall-ui/public/visor.css +31 -1
  16. package/modules/hall-ui/public/visor.js +53 -3
  17. package/modules/hall-ui/records/home-reshuffle.md +1 -1
  18. package/modules/hall-ui/records/visor.md +10 -0
  19. package/modules/onboarding/founding-mode.js +4 -1
  20. package/modules/onboarding/genesis-home.js +57 -2
  21. package/modules/onboarding/routes/onboarding.js +2 -0
  22. package/modules/ui-design/kit/fixtures/founding-genesis-votes.json +193 -0
  23. package/modules/ui-design/kit/fixtures/me-founding-demo.json +0 -1
  24. package/modules/ui-design/kit/fixtures/me-founding.json +0 -1
  25. package/package-lock.json +2 -2
  26. package/package.json +1 -1
  27. package/release-notes.json +12 -0
  28. package/src/module-api.js +1 -1
  29. package/tests/founding_mode.mjs +13 -3
  30. package/tests/genesis_home.mjs +92 -4
  31. package/tests/hall_board_world.mjs +7 -35
  32. package/tests/hall_home_ships_bounded.mjs +11 -27
  33. package/tests/hall_landing_boot.mjs +7 -8
  34. package/tests/hall_nav.mjs +2 -2
  35. package/tests/hall_visor.mjs +9 -2
  36. package/tests/hall_visor_profile.mjs +150 -0
  37. package/tests/leaderboard_roles.mjs +3 -17
@@ -413,20 +413,14 @@
413
413
  });
414
414
  }
415
415
  // renderProfile(builder) — the Home surfaces fed by the /me payload: the
416
- // Standing chip's card, the welcome line and the system notices. The full
417
- // Accomplishments band it also painted went with the view in task 1005050:
418
- // your numbers are the Profile page now.
416
+ // welcome line and the system notices. The Standing chip that sat top right
417
+ // went in task 1005249: in game mode the visor's own you-block shows your
418
+ // details on hover and opens your profile (visor.js); the Profile page has
419
+ // the rest.
419
420
  function renderProfile(builder) {
420
421
  const cost = ctx.lastCostState;
421
422
  const needs = ctx.lastNeedsState;
422
423
  const rebase = ctx.lastRebaseState;
423
- const prefs = Array.isArray(builder.preferred_disciplines) ? builder.preferred_disciplines : [];
424
-
425
- // #757: this builder's place on the Roll. Null until the leaderboard rows
426
- // load (they're fetched async after the card's first paint; the card
427
- // re-renders once they arrive) — when null the stat simply omits.
428
- const rollPlace = leaderboardPlace(builder.github_login);
429
- const karmaTotal = Number(builder.karma) || 0;
430
424
 
431
425
  // The highest-priority `needs` item that isn't satisfied (ADR 0073); Home's
432
426
  // attention cards carry it (renderSystemNotices, below).
@@ -448,64 +442,9 @@
448
442
  welcomeLine.textContent = `Welcome back, ${builder.display_name || builder.github_login || 'builder'}.`;
449
443
  }
450
444
 
451
- // task 1723: the Home dashboard mirrors — quick-stat tiles + the standing
452
- // summary card — are fed from the same /me payload. All writes are guarded:
453
- // the widgets are registry-owned and a module could unregister them.
454
- const setText = (id, text) => {
455
- const el = document.getElementById(id);
456
- if (el) el.textContent = text;
457
- };
458
-
459
- // task 1003464: the Home card as the mock draws it — an identity LINE and a
460
- // three-row fact ledger. The mock repeats Credits and the place even though
461
- // the stat band above carries both; the card is built as approved, all three
462
- // rows, because that content is also what makes it end level with Goals.
463
- // The notices that used to stack in here are inbox lines now.
464
- const homeStanding = document.getElementById('home-standing-body');
465
- if (homeStanding) {
466
- const place = rollPlace ? `${ordinal(rollPlace.place)} of ${fmtNum(rollPlace.total)}` : '—';
467
- homeStanding.innerHTML = `
468
- <div class="home-who">
469
- ${builder.avatar_url
470
- ? `<img class="home-who__avatar" src="${escapeHtml(builder.avatar_url)}" alt="">`
471
- : '<span class="home-who__avatar" aria-hidden="true"></span>'}
472
- <div class="home-who__meta">
473
- <p class="home-who__name">${escapeHtml(builder.display_name || builder.github_login || 'Builder')}</p>
474
- <p class="home-who__handle">@${escapeHtml(builder.github_login || 'unknown')}</p>
475
- </div>
476
- <span class="home-who__rank">${builder.rank ? renderRankBadge(normalizeRank(builder.rank), { tip: false }) : ''}</span>
477
- </div>
478
- <div class="hall-standing__more">
479
- <dl class="home-facts home-facts--grid">
480
- <div><dt>${escapeHtml(curLabel(true))}</dt><dd>${fmtNum(builder.total_credits)}</dd></div>
481
- <div><dt>Karma</dt><dd>${fmtNum(karmaTotal)}</dd></div>
482
- <div><dt>Shipped</dt><dd id="standing-shipped">${shipState.seen ? fmtNum(shipState.total) : '—'}</dd></div>
483
- <div><dt>Leaderboard place</dt><dd>${place}${rolePlaceText(rollPlace) ? `<span title="Your place among the ${rollPlace.role.total} builders shown as ${ROLE_AS[rollPlace.role.craft]}, ranked by the ${curLabel()} that role earned."> · ${rolePlaceText(rollPlace)}</span>` : ''}</dd></div>
484
- </dl>
485
- <dl class="home-facts">
486
- <div><dt>Preferred work</dt><dd>${prefs.length ? escapeHtml(prefs.join(', ')) : PREFS_EMPTY}</dd></div>
487
- </dl>
488
- ${builder.id != null ? `<p class="card-foot"><a href="/profile?id=${encodeURIComponent(builder.id)}">View full profile →</a></p>` : ''}
489
- </div>
490
- `;
491
- }
492
- // task 1004774: Standing is the page-head chip now, not a Home card. The
493
- // who-line above IS the chip: at rest it shows the avatar and rank, and on
494
- // hover it widens left to show the name while .hall-standing__more drops down.
495
- const standingChip = document.getElementById('hall-standing');
496
- if (standingChip && !ctx.newcomerGated) standingChip.hidden = false;
497
445
  renderSystemNotices({ rebaseTasks, need, actionNeeds, cost });
498
446
  }
499
447
 
500
- // The ONE string for "no preferred work chosen" — the mock's copy.
501
- const PREFS_EMPTY = 'Not set yet';
502
-
503
- const ordinal = (n) => {
504
- const v = Number(n) || 0;
505
- const s = (v % 100 >= 11 && v % 100 <= 13) ? 'th' : ({ 1: 'st', 2: 'nd', 3: 'rd' }[v % 10] || 'th');
506
- return `${v}${s}`;
507
- };
508
-
509
448
  // task 1003464: the three system notices as inbox LINES on Home (the
510
449
  // placement rule in modules/hall-ui/CLAUDE.md: an action awaiting the builder
511
450
  // is a line item in Needs-attention, never a card). Only what awaits the
@@ -568,59 +507,6 @@
568
507
  h1.textContent = `${greetingWord(new Date().getHours())}, ${builder.display_name || builder.github_login || 'builder'}`;
569
508
  }
570
509
  }
571
- // task 1004854: Home asks for only the newest HOME_SHIPS_LIMIT ships plus the
572
- // server's `total` — on every load AND every live refresh. The count rides the
573
- // Standing chip's card. The whole ledger was Accomplishments', which folded into
574
- // the Profile page in task 1005050 (its Works ledger reads its own record).
575
- const HOME_SHIPS_LIMIT = 5;
576
- const shipState = { recent: [], total: 0, seen: false };
577
- function setRecentShips(payload) {
578
- shipState.recent = (payload && payload.ships) || [];
579
- shipState.total = Number.isFinite(payload && payload.total) ? payload.total : shipState.recent.length;
580
- shipState.seen = true;
581
- renderRecentShips();
582
- }
583
- function renderRecentShips() {
584
- // task 1004774: the Standing hover card carries the shipped count.
585
- const standingShipped = document.getElementById('standing-shipped');
586
- if (standingShipped) standingShipped.textContent = fmtNum(shipState.total);
587
- }
588
- // The Roll’s rows, kept ONLY for leaderboardPlace() below — the Standing
589
- // card’s "#N on the leaderboard" stat. sortBy/sortDir went to /roster with
590
- // the table (task 1003441); nothing on this page sorts them any more.
591
- const lbState = { rows: [] };
592
- function leaderboardPlace(login) {
593
- const rows = Array.isArray(lbState.rows) ? lbState.rows : [];
594
- if (!rows.length || !login) return null;
595
- const ranked = [...rows].sort(
596
- (a, b) => (Number(b.total_credits) || 0) - (Number(a.total_credits) || 0),
597
- );
598
- const idx = ranked.findIndex((r) => r.github_login === login);
599
- if (idx === -1) return null;
600
- // task 1004437: the place inside the builder's MAIN role too, the roster's
601
- // role toggle read the same way (credits earned in that craft, among the
602
- // builders it is shown for), so an artist's card can say where they stand
603
- // as an artist and not only beside every engineer's session pay.
604
- const me = ranked[idx];
605
- const main = me.roles && me.roles.main;
606
- let role = null;
607
- if (main && me.roles.credits_by_craft) {
608
- const credit = (r) => Number(r.roles && r.roles.credits_by_craft && r.roles.credits_by_craft[main]) || 0;
609
- const peers = ranked.filter((r) => r.roles && Array.isArray(r.roles.shown) && r.roles.shown.includes(main));
610
- const order = peers.map((r, i) => ({ r, i })).sort((a, b) => (credit(b.r) - credit(a.r)) || (a.i - b.i));
611
- const at = order.findIndex((x) => x.r === me);
612
- if (at !== -1) role = { craft: main, place: at + 1, total: peers.length };
613
- }
614
- return { place: idx + 1, total: ranked.length, role };
615
- }
616
- const ROLE_AS = { artisan: 'an artisan', artist: 'an artist' };
617
- // "#2 as an artist" — only when it says something the overall place does not.
618
- function rolePlaceText(p) {
619
- if (!p || !p.role || !ROLE_AS[p.role.craft] || p.role.place === p.place) return '';
620
- return `#${p.role.place} as ${ROLE_AS[p.role.craft]}`;
621
- }
622
-
623
-
624
- return { lbState, mountHallWidgets, renderGreeting, renderLanding, renderSessionRefused, renderNav, renderProfile, renderRecentShips, HOME_SHIPS_LIMIT, setRecentShips, shipState };
510
+ return { mountHallWidgets, renderGreeting, renderLanding, renderSessionRefused, renderNav, renderProfile };
625
511
  };
626
512
  })();
@@ -47,9 +47,9 @@
47
47
  // (task 1005054: the quick-stats strip and the version tab left Home. The
48
48
  // zone they held, home-stats, is the project city's — home-city.js.)
49
49
 
50
- // (task 1004774: the Standing summary is no longer a Home card. It is the
51
- // chip at the top right of the page head — index.html #hall-standing — whose
52
- // hover card holds #home-standing-body, filled by hall-render.js renderProfile.)
50
+ // (task 1004774 moved the Standing summary off Home's cards into a chip at the
51
+ // top right of the page head; task 1005249 removed that chip. Your details
52
+ // are the visor's you-block on hover, and the Profile page.)
53
53
 
54
54
  // (Goals — goals.js registers itself into the other half of the Home band.)
55
55
 
@@ -0,0 +1,61 @@
1
+ {
2
+ "_": "Several genesis stages sitting in the Board Room at once, with the vote-on-all panel (task 1005199). Same shell as index-genesis.states.json; /founding/genesis answers founding-genesis-votes.json, built from the real server shaper.",
3
+ "page": "/builders/",
4
+ "_storage": "The hall asks a first-visit question (the session mode picker, craft-mode.js) over every page; seeding \"already asked\" renders the page a returning builder sees (task 1005080).",
5
+ "storage": {
6
+ "session": {
7
+ "hall-craft-asked": "1"
8
+ }
9
+ },
10
+ "surface": "hall-ui",
11
+ "stub": {
12
+ "prefix": "/builders/",
13
+ "fixtures": {
14
+ "me": "me-founding",
15
+ "founding-genesis": "founding-genesis-votes"
16
+ }
17
+ },
18
+ "modeQuery": false,
19
+ "ignoreRequests": [
20
+ "/api/(gds|bongos)/me$",
21
+ "/api/(gds|bongos)/me/",
22
+ "/api/(gds|bongos)/tasks",
23
+ "/api/(gds|bongos)/claims",
24
+ "/api/(gds|bongos)/goals",
25
+ "/api/(gds|bongos)/inbox",
26
+ "/api/(gds|bongos)/live",
27
+ "/api/(gds|bongos)/analytics/",
28
+ "/api/(gds|bongos)/achievements",
29
+ "/api/(gds|bongos)/versions",
30
+ "/api/(gds|bongos)/leaderboard",
31
+ "/api/(gds|bongos)/removal-proposals",
32
+ "/api/(gds|bongos)/blockers"
33
+ ],
34
+ "_ignored": "removal-proposals and blockers are fixtures the kit stub does not carry; index.states.json's home render reports the same two 404s.",
35
+ "ignoreConsole": [
36
+ "/api/(gds|bongos)/",
37
+ "\\b401\\b",
38
+ "\\b404\\b",
39
+ "Unauthorized",
40
+ "Not Found",
41
+ "load failed"
42
+ ],
43
+ "states": {
44
+ "votes": {
45
+ "auth": true,
46
+ "actions": [
47
+ [
48
+ "wait",
49
+ 800
50
+ ]
51
+ ],
52
+ "expect": {
53
+ "visible": [
54
+ "#genesis-home",
55
+ "#founding-band",
56
+ "#genesis-votes-h"
57
+ ]
58
+ }
59
+ }
60
+ }
61
+ }
@@ -54,13 +54,6 @@
54
54
  is the board's own (.page-head--board). -->
55
55
  <div class="page-head page-head--board page-head--hall">
56
56
  <h1 id="hall-h1" class="page-head__h">Builders' Hall</h1>
57
- <!-- task 1004774: Standing left the Home band for this chip. At rest it
58
- shows the avatar and rank. On hover or keyboard focus the chip itself
59
- widens to the left into the top of the card, and only the facts below
60
- drop down (#home-standing-body, filled by hall-render.js renderProfile). -->
61
- <div class="hall-standing" id="hall-standing" hidden tabindex="0" aria-label="Your standing">
62
- <div class="hall-standing__card" id="home-standing-body"></div>
63
- </div>
64
57
  </div>
65
58
 
66
59
  <!-- BV1.R75 (ADR 0062 §4): hall widgets are NOT hardcoded here. Every widget
@@ -443,8 +443,19 @@
443
443
  window.location.assign(menuPath() + (rest || '?from=' + encodeURIComponent(here)));
444
444
  }
445
445
  }
446
- function buildOverlay(rest) {
447
- var src = menuPath() + withEmbed(rest);
446
+ // Your profile in the same window (task 1005249): the visor's you-block opens it over
447
+ // the place, as Options does. Its own page is where a window cannot be drawn.
448
+ function profilePath() { return base() + '/profile'; }
449
+ function openProfile() {
450
+ try { buildOverlay('', { path: profilePath(), title: 'Your profile' }); } catch (_) {
451
+ overlay = null; dialog = null;
452
+ window.location.assign(profilePath());
453
+ }
454
+ }
455
+ // `page` is { path, title } for a page other than the menu; with none, the menu.
456
+ function buildOverlay(rest, page) {
457
+ var title = page ? page.title : 'Options';
458
+ var src = (page ? page.path : menuPath()) + withEmbed(rest);
448
459
  if (!overlay) {
449
460
  if (!window.OTBDialog || typeof window.OTBDialog.bind !== 'function') throw new Error('no dialog');
450
461
  overlay = document.createElement('div');
@@ -464,7 +475,14 @@
464
475
  });
465
476
  }
466
477
  var frame = overlay.querySelector('.opt-window__frame');
467
- // A fresh address reloads the menu; the same one keeps it as it was left.
478
+ // The window says which page it holds: the box, its close button and the frame.
479
+ var named = [['.opt-window__box', 'aria-label', title], ['.opt-window__x', 'aria-label', 'Close ' + title.toLowerCase()]];
480
+ for (var n = 0; n < named.length; n += 1) {
481
+ var el = overlay.querySelector(named[n][0]);
482
+ if (el && el.setAttribute) el.setAttribute(named[n][1], named[n][2]);
483
+ }
484
+ frame.setAttribute('title', title);
485
+ // A fresh address reloads the page; the same one keeps it as it was left.
468
486
  if (frame.getAttribute('src') !== src) frame.setAttribute('src', src);
469
487
  dialog.open();
470
488
  }
@@ -477,7 +495,7 @@
477
495
  // The menu's own page never opens the window (nor a page in a frame: see the if below).
478
496
  function overlayHere() { return on() && !(document.body && document.body.getAttribute('data-page') === 'settings'); }
479
497
  if (!embedded) {
480
- window.OTBOptionsOverlay = { open: openOverlay, close: closeOverlay, isOpen: overlayOpen };
498
+ window.OTBOptionsOverlay = { open: openOverlay, openProfile: openProfile, close: closeOverlay, isOpen: overlayOpen };
481
499
  // A link to the menu (the visor's Options row, the profile chip, the start
482
500
  // screen's Options) opens the window in game mode instead of leaving the place.
483
501
  if (document.addEventListener) document.addEventListener('click', function (e) {
@@ -883,6 +883,7 @@ html[data-theme="dark"] .brand-mark__mark { --mark-ink: #e2e1e4; }
883
883
  html[data-game="on"] .visor__me, html[data-game="on"] .visor__hints { transform: none; }
884
884
  html[data-game="on"] .visor__me { gap: var(--ds-space-hair); }
885
885
  html[data-game="on"] .visor__sprite { width: 36px; height: 36px; }
886
+ html[data-game="on"] .visor__card { display: none; }
886
887
  html[data-game="on"] .visor__num { font-size: var(--ds-text-4xl); }
887
888
  html[data-game="on"] .visor__credits { flex-direction: column; align-items: flex-start; gap: 2px; }
888
889
  html[data-game="on"] .visor__unit { font-size: var(--ds-text-2xs); line-height: 1; }
@@ -4337,36 +4338,6 @@ html[data-door="out"] #hall-main { width: 100%; }
4337
4338
  box-sizing: border-box;
4338
4339
  }
4339
4340
 
4340
- /* ---------- Home: the Standing card as the mock draws it (task 1003464) ----------
4341
- docs/design/mocks/hall/board/v3.html: an identity LINE (a 36px avatar, the
4342
- name over the handle, the rank on the right) and a three-row fact ledger —
4343
- Credits, On the board, Preferred work. With .view-zone--band stretching its
4344
- two cards, this content is what makes Standing end level with Goals. */
4345
- .home-who { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
4346
- .home-who__avatar {
4347
- width: 36px; height: 36px; flex: none;
4348
- border-radius: 50%;
4349
- background: var(--skeleton);
4350
- border: 1px solid var(--rule);
4351
- object-fit: cover;
4352
- }
4353
- .home-who__meta { display: flex; flex-direction: column; min-width: 0; }
4354
- .home-who__name { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
4355
- .home-who__handle { margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
4356
- .home-who__rank { margin-left: auto; }
4357
- .home-facts { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 0; }
4358
- .home-facts > div { display: contents; }
4359
- .home-facts dt, .home-facts dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--rule-soft); }
4360
- .home-facts dt {
4361
- font-family: var(--label-face);
4362
- font-size: var(--label-size);
4363
- letter-spacing: var(--label-space);
4364
- text-transform: var(--label-case);
4365
- color: var(--ink-faint);
4366
- }
4367
- .home-facts dd { text-align: right; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
4368
- .home-facts > div:first-child dt, .home-facts > div:first-child dd { border-top: 0; padding-top: 0; }
4369
-
4370
4341
  /* ---------- hall-kit components (task 2166) ----------
4371
4342
  Styles for the shared kit (hall-kit.js / window.OTBKit): pager bar,
4372
4343
  filter-bar disclosure + chips, tab strip, empty state, skeleton shimmer,
@@ -4857,7 +4828,7 @@ html.palette-open { overflow: hidden; }
4857
4828
  under it, Standing as a chip at the top right with a hover card, the
4858
4829
  Needs-attention slices as cards that open a window, and Your work beside
4859
4830
  Recently shipped. */
4860
- body[data-page="home"] .page-head--hall { position: relative; margin: 0 0 12px; padding-right: 180px; }
4831
+ body[data-page="home"] .page-head--hall { position: relative; margin: 0 0 12px; }
4861
4832
  body[data-page="home"] .stat-tile { padding: 12px 22px; min-height: 0; gap: 4px; }
4862
4833
  body[data-page="home"] .stat-tile__num { font-size: clamp(20px, 2vw, 26px); }
4863
4834
  body[data-page="home"] #home-stats .stat-row { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
@@ -4875,38 +4846,6 @@ body[data-page="home"] #home-stats .stat-row { border-bottom-left-radius: 0; bor
4875
4846
  .version-tab__fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; }
4876
4847
  .version-tab__pct { color: var(--ink-soft); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
4877
4848
 
4878
- .hall-standing { position: absolute; top: 0; right: 0; height: 44px; outline: none; }
4879
- .hall-standing[hidden] { display: none; }
4880
- /* The chip IS the top of the card: anchored at the right, it grows LEFT as the
4881
- name slides in, and only .hall-standing__more drops down below it. */
4882
- .hall-standing__card {
4883
- position: absolute; top: 0; right: 0; z-index: 20; min-width: 0;
4884
- background: var(--bg-card); border-radius: 22px; padding: 4px 6px 4px 4px;
4885
- transition: min-width .2s ease, border-radius .2s ease, padding .2s ease, box-shadow .2s ease;
4886
- }
4887
- .hall-standing__card .home-who { gap: 8px; padding: 0; }
4888
- .hall-standing__card .home-who__avatar { width: 36px; height: 36px; }
4889
- .hall-standing__card .home-who__meta {
4890
- max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap;
4891
- transition: max-width .2s ease, opacity .2s ease;
4892
- }
4893
- .hall-standing__more {
4894
- max-height: 0; overflow: hidden; opacity: 0;
4895
- transition: max-height .25s ease, opacity .2s ease;
4896
- }
4897
- .hall-standing__more .home-facts { margin-top: 12px; }
4898
- .hall-standing__more .card-foot { margin: 12px 0 0; }
4899
- .hall-standing:hover .hall-standing__card,
4900
- .hall-standing:focus-within .hall-standing__card {
4901
- min-width: 300px; border-radius: var(--radius); padding: 14px 16px 16px;
4902
- box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
4903
- }
4904
- .hall-standing:hover .home-who__meta,
4905
- .hall-standing:focus-within .home-who__meta { max-width: 200px; opacity: 1; }
4906
- .hall-standing:hover .hall-standing__more,
4907
- .hall-standing:focus-within .hall-standing__more { max-height: 420px; opacity: 1; }
4908
- .hall-standing:focus-visible .hall-standing__card { outline: 2px solid var(--focus); outline-offset: 2px; }
4909
-
4910
4849
  .attn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
4911
4850
  .attn-card {
4912
4851
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 100px;
@@ -4926,20 +4865,11 @@ body[data-page="home"] #home-stats .stat-row { border-bottom-left-radius: 0; bor
4926
4865
  .home-split > .home-split__col[hidden] + .home-split__col { grid-column: 1 / -1; }
4927
4866
 
4928
4867
  @media (max-width: 760px) {
4929
- body[data-page="home"] .page-head--hall { padding-right: 0; }
4930
- .hall-standing { position: relative; display: block; margin-top: 10px; }
4931
- .hall-standing__card { left: 0; right: auto; }
4932
- .hall-standing:hover .hall-standing__card,
4933
- .hall-standing:focus-within .hall-standing__card { min-width: min(300px, calc(100vw - 32px)); }
4934
4868
  .home-split { grid-template-columns: 1fr; }
4935
4869
  }
4936
4870
  /* With Standing gone from the band, a lone card there (Goals) takes the row. */
4937
4871
  .view-zone--band > .scroll:only-child { grid-column: 1 / -1; }
4938
- /* The Standing hover card's stat row: four figures in a 2x2 grid, label over number. */
4939
- .home-facts--grid { grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
4940
- .home-facts--grid > div { display: flex; flex-direction: column; gap: 2px; }
4941
- .home-facts--grid dt, .home-facts--grid dd { border-top: 0; padding: 0; text-align: left; }
4942
- .home-facts--grid dd { font-family: var(--font-display); font-size: 20px; font-weight: 300; }
4872
+
4943
4873
 
4944
4874
  /* NO TOP BLOCK (task 1004836, owner 2026-10-23). The left rail highlights the
4945
4875
  page and the top bar names it, so a page draws nothing above its first
@@ -86,10 +86,40 @@ html[data-game="on"] .visor:not([hidden]) {
86
86
  position: absolute; left: var(--visor-inset-left); right: var(--visor-inset-right); bottom: var(--visor-inset-bottom);
87
87
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: var(--ds-space-sm);
88
88
  }
89
+ /* you are a link (task 1005249): hover or focus shows your card above, a click opens your profile */
89
90
  .visor__me {
90
- justify-self: start; display: flex; align-items: center; gap: var(--ds-space-sm);
91
+ pointer-events: auto; position: relative; justify-self: start; display: flex; align-items: center; gap: var(--ds-space-sm);
92
+ color: inherit; text-decoration: none; cursor: pointer;
91
93
  transform: perspective(900px) rotateY(16deg); transform-origin: left center;
92
94
  }
95
+ .visor__me:hover { text-decoration: none; }
96
+ .visor__me:hover .visor__name, .visor__me:focus-visible .visor__name { color: var(--ink); }
97
+ .visor__me:focus-visible { outline: 0; box-shadow: var(--press-focus); }
98
+ /* the card: the sheet's night panel between two strong hairlines, standing over you */
99
+ .visor__card {
100
+ position: absolute; left: 0; bottom: calc(100% + var(--ds-space-xs)); z-index: 1;
101
+ box-sizing: border-box; width: 16rem; padding: var(--ds-space-sm);
102
+ display: flex; flex-direction: column; gap: var(--ds-space-xs);
103
+ background: var(--bg-card); color: var(--ink);
104
+ border: 0 solid var(--rule); border-left-width: var(--line-strong); border-right-width: var(--line-strong);
105
+ opacity: 0; visibility: hidden; transform: translateY(4px);
106
+ transition: opacity var(--ds-dur-fast) var(--ds-ease), transform var(--ds-dur-fast) var(--ds-ease), visibility 0s linear var(--ds-dur-fast);
107
+ }
108
+ .visor__me:hover .visor__card, .visor__me:focus-visible .visor__card {
109
+ opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
110
+ }
111
+ .visor__card-who { display: flex; flex-direction: column; gap: 2px; }
112
+ .visor__card-name { font-size: var(--ds-text-lg); color: var(--ink); }
113
+ .visor__card-handle { font-family: var(--font-mono); font-size: var(--ds-text-sm); color: var(--ink-soft); }
114
+ .visor__facts { display: flex; flex-direction: column; }
115
+ .visor__fact {
116
+ display: flex; align-items: baseline; justify-content: space-between; gap: var(--ds-space-xs);
117
+ padding: var(--ds-space-hair) 0; border-top: var(--ds-line) solid var(--rule-soft);
118
+ }
119
+ .visor__fact-k { font-size: var(--ds-text-sm); color: var(--ink-soft); }
120
+ .visor__fact-v { font-size: var(--ds-text-md); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
121
+ .visor__card-open { font-size: var(--ds-text-sm); color: var(--accent-ink); }
122
+ .visor__card-name, .visor__card-open, .visor__fact-k { font-family: var(--name-face); font-weight: var(--name-weight); text-transform: var(--name-case); letter-spacing: var(--name-space); }
93
123
  .visor__sprite {
94
124
  flex: none; box-sizing: border-box; width: 56px; height: 56px; object-fit: cover; image-rendering: pixelated;
95
125
  background: var(--bg-card); border: var(--line-strong) solid var(--char, var(--ink-soft)); clip-path: var(--cut-path-sm);
@@ -10,6 +10,10 @@
10
10
  // - the foot row. Left: your sprite (your character's head, wearing the visor, its rim in
11
11
  // the character's colour; task 1005218), your character's name and your credits
12
12
  // (builders.total_credits — credits only, never a payout; the spec's "does not exist").
13
+ // That block is you: on hover or focus it shows your details (name, handle, rank,
14
+ // credits, karma, preferred work), and a click opens your whole profile in the game's
15
+ // window over the place (task 1005249; the Standing chip that sat top right of Home
16
+ // went with it).
13
17
  // Centre: your character's main action, the one accent button, with its key. Right: the
14
18
  // quiet key hints, no boxes: your other actions and "Actions" (key A), which opens the
15
19
  // sheet (your character's actions, then the keys of the place you are in, then Options on
@@ -67,7 +71,9 @@
67
71
  var AVOID = ['l', '0', '/', '?', 'f', 'k', '+', '-', '='];
68
72
  var NAMES = { artisan: 'Artisan', artist: 'Artist', patron: 'Patron' };
69
73
 
70
- function esc(v) { return window.OTB && window.OTB.escapeHtml ? window.OTB.escapeHtml(v) : String(v == null ? '' : v).replace(/[^\w .,:'-]/g, ''); }
74
+ // The hall's own escaper; without it, only safe characters pass. A link's '/' and a
75
+ // handle's '@' are among them (task 1005249: stripping them broke the profile link).
76
+ function esc(v) { return window.OTB && window.OTB.escapeHtml ? window.OTB.escapeHtml(v) : String(v == null ? '' : v).replace(/[^\w .,:@\/-]/g, ''); }
71
77
  function craft() { return window.OTBCraftMode || null; }
72
78
  // The character on the glass: the held one, else this session's mode, else none.
73
79
  function character() {
@@ -91,6 +97,22 @@
91
97
  var n = me && me.builder ? Number(me.builder.total_credits) : NaN;
92
98
  return isFinite(n) ? n : null;
93
99
  }
100
+ // You, from /me: the hover card's facts. Null until /me answers. Pure, for the tests.
101
+ function meFacts(me) {
102
+ var b = me && me.builder;
103
+ if (!b) return null;
104
+ var karma = Number(b.karma);
105
+ var rank = String(b.rank || '');
106
+ var prefs = Array.isArray(b.preferred_disciplines) ? b.preferred_disciplines.filter(Boolean) : [];
107
+ return {
108
+ name: String(b.display_name || b.github_login || 'Builder'),
109
+ handle: b.github_login ? '@' + String(b.github_login) : '',
110
+ rank: rank ? rank.charAt(0).toUpperCase() + rank.slice(1) : '',
111
+ credits: credits(),
112
+ karma: isFinite(karma) ? Math.round(karma) : 0,
113
+ prefs: prefs.join(', '),
114
+ };
115
+ }
94
116
  function creditsText(n) {
95
117
  if (n == null) return '';
96
118
  var v = Math.round(n);
@@ -299,11 +321,12 @@
299
321
  progressHtml() +
300
322
  focusHtml() +
301
323
  '<div class="visor__foot">' +
302
- '<div class="visor__me">' +
324
+ '<a class="visor__me" data-visor-me href="' + esc(hallHref('/profile')) + '">' +
303
325
  (sprite ? '<img class="visor__sprite" src="' + esc(sprite) + '" alt="" width="32" height="32" decoding="async">' : '') +
304
326
  '<span class="visor__who"><span class="visor__name">' + esc(NAMES[id]) + '</span>' +
305
327
  '<span class="visor__credits" data-visor-credits>' + creditsHtml(n) + '</span></span>' +
306
- '</div>' +
328
+ cardHtml() +
329
+ '</a>' +
307
330
  mainHtml(main) +
308
331
  '<div class="visor__hints">' + scene.actions.map(function (a, i) { return a.lead ? placeHintHtml(a, i, keys.place[i]) : ''; }).join('') + acts.slice(1).map(hintHtml).join('') +
309
332
  '<button class="visor__hint visor__hint--sheet" type="button" data-visor-sheet aria-expanded="false" aria-controls="visor-sheet">' +
@@ -311,6 +334,24 @@
311
334
  '</div>' +
312
335
  '</div>';
313
336
  }
337
+ // The hover card over the you-block (task 1005249): who you are and your standing, then
338
+ // what a click does. Text inside the link, so a reader hears it as part of the link.
339
+ function cardHtml() {
340
+ var C = craft();
341
+ var f = meFacts(C && typeof C.me === 'function' ? C.me() : null);
342
+ if (!f) return '<span class="visor__card"><span class="visor__card-open">Open your profile</span></span>';
343
+ var fact = function (k, v) { return '<span class="visor__fact"><span class="visor__fact-k">' + esc(k) + '</span><span class="visor__fact-v">' + esc(v) + '</span></span>'; };
344
+ return '<span class="visor__card">' +
345
+ '<span class="visor__card-who"><span class="visor__card-name">' + esc(f.name) + '</span>' +
346
+ (f.handle ? '<span class="visor__card-handle">' + esc(f.handle) + '</span>' : '') + '</span>' +
347
+ '<span class="visor__facts">' +
348
+ (f.rank ? fact('Rank', f.rank) : '') +
349
+ fact('Credits', f.credits == null ? '—' : creditsText(f.credits).replace(/ credits?$/, '')) +
350
+ fact('Karma', String(f.karma)) +
351
+ fact('Preferred work', f.prefs || 'Not set yet') +
352
+ '</span>' +
353
+ '<span class="visor__card-open">Open your profile</span></span>';
354
+ }
314
355
  // The kit's segments (controls.css .seg), always beside the words that say the same thing.
315
356
  function progressHtml() {
316
357
  if (!progress) return '';
@@ -434,6 +475,14 @@
434
475
  if (t.closest('[data-visor-unfocus]')) { dropFocus(); return; }
435
476
  if (t.closest('[data-visor-lead]')) { if (focus && focus.lead && !focus.lead.busy) { closeSheet(false); focus.lead.run(); } return; }
436
477
  if (t.closest('[data-visor-sheet]')) { openSheet(); return; }
478
+ // You: your profile in the game's window, the place still drawn behind it. With no
479
+ // window (shell-game.js absent), the link opens the profile page.
480
+ if (t.closest('[data-visor-me]')) {
481
+ var W = window.OTBOptionsOverlay;
482
+ closeSheet(false);
483
+ if (W && typeof W.openProfile === 'function' && !e.metaKey && !e.ctrlKey && !e.shiftKey) { e.preventDefault(); W.openProfile(); }
484
+ return;
485
+ }
437
486
  var sc = t.closest('[data-visor-scene]');
438
487
  if (sc && scene) { var a = scene.actions[Number(sc.getAttribute('data-visor-scene'))]; closeSheet(false); if (a) a.run(); return; }
439
488
  var act = t.closest('[data-visor-act]');
@@ -508,6 +557,7 @@
508
557
  keyFor: keyFor,
509
558
  resolveKeys: resolveKeys,
510
559
  creditsText: creditsText,
560
+ meFacts: meFacts,
511
561
  character: character,
512
562
  pickVersion: pickVersion,
513
563
  segStates: segStates,
@@ -6,7 +6,7 @@ The owner's Builders' Hall feedback (idea 1001262), home-page half, built to the
6
6
  - **Banner + version tab.** The stat row is slimmer (`body[data-page="home"]` overrides), and under it
7
7
  `#home-version` draws the version the greeting's sub-line names, from the same `currentVersion()`
8
8
  read — `renderVersionTab` in `hall-render.js`. Hidden while nothing is being built.
9
- - **Standing is a chip, not a card.** The `home-standing` widget is gone; `#hall-standing` sits in the
9
+ - **Standing is a chip, not a card.** *(Removed in task 1005249: your details are the visor's you-block now, `records/visor.md`.)* The `home-standing` widget is gone; `#hall-standing` sits in the
10
10
  page head (it is chrome, not a `<section class="scroll">`, so the registry rule is untouched). The
11
11
  card it opens on hover or keyboard focus is still `#home-standing-body`, filled by `renderProfile`.
12
12
  The place row reads "Leaderboard place" — the owner asked for no "on the board" wording. The chip
@@ -19,6 +19,16 @@ The visor is the control and the scene is the view: every main call to action in
19
19
  - **The glass binds keys in game mode only.** `onKey` now returns unless `html[data-game="on"]`: the glass was never drawn outside game mode, so its keys no longer act there either (before, a held character's letter keys still ran on a classic page).
20
20
  - **The Governor City keeps ADR 0403.** In game mode (`html.visor-on`) the door's button (`#cityStart`) and the archived Street links leave the scene (`city.css`). The door is the lead action, on D, in the door's own words and case ("decide 37 in a row", or "start governing"; lowercase is the door's, task 1005210); it re-registers only when those words change. The archived links are rows in the sheet ("Archived: Street", "Archived: Building Level Views"), read off the page's own archived line so the words and the addresses cannot drift; reached by A and the keyboard. The city line stays on the scene as words, raised to `bottom: 224px` because the extra hint wraps the hints onto a second line at a desk width and the centred accent button rises with it. A building's card is a pop-up, not the scene, and keeps its own buttons and keys. Classic mode is as it was.
21
21
 
22
+ ## You on the glass (task 1005249)
23
+
24
+ - **The Standing chip is gone; you are on the visor.** The owner (2026-11-12): the profile card top right of Home (`#hall-standing`, task 1004774) is removed in both modes, and the you-block bottom left of the visor carries it. Home's two reads that fed only that chip (`/me/recent-ships?limit=5` and `/public/leaderboard`) went with it, so the Standing chip's leaderboard place and "#N as an artist" are on no page now; your shipped count is on the Profile page.
25
+ - **Hover or focus shows your card.** `.visor__me` is a link (`pointer-events: auto`), and above it `.visor__card` shows your name and handle, then Rank, Credits, Karma and Preferred work, then "Open your profile". All from `/me` through `OTBCraftMode.me()` (`meFacts`, pure); no extra read. The card is the sheet's night panel between two strong hairlines. A phone has no hover, so the card is not drawn there (the shared phone block) and a tap goes straight to the profile.
26
+ - **A click opens your whole profile in the game's window**, over the place, the way Options opens: `OTBOptionsOverlay.openProfile()` (`shell-game.js`) frames `/profile?embed=1` in the same `.opt-window`, which now names the page it holds (box, close button, frame title). Escape, the scrim and the close button shut it. With no window to draw, the link opens the profile page.
27
+ - **Keyboard order is reading order.** You are the first stop on the glass, then the accent button.
28
+ - **A fix that came with it.** The visor's fallback escaper (used when the hall's own `OTB.escapeHtml` is not loaded) stripped `/` and `@`, which would have broken the link; it lets both through now.
29
+
30
+ Tests: `tests/hall_visor_profile.mjs` (the facts in a vm; the card, the window, Escape and the plain-link fallback in a real browser).
31
+
22
32
  ## The sky on the glass (task 1005210)
23
33
 
24
34
  - **What left the sky in game mode** (`thinking.css`, under `html.visor-on`): the top row's lens switch and every pill, the jump field, the thought composer, and the foot's clock and legend. The brand line and its figures stay, as words. A building-like pop-up (the panel, the list, the start dialog, the tour) is not the scene and keeps its buttons.
@@ -37,7 +37,10 @@ const WAKES = Object.freeze({
37
37
  // task 1005051: Roadmap folded into Goals, so scope wakes Goals and its map.
38
38
  scope: Object.freeze(['goals', 'goal-map']),
39
39
  strategize: Object.freeze(['work']),
40
- charter: Object.freeze(['board-room']),
40
+ // task 1005199: charter woke the Board Room, but scope and strategize are already
41
+ // closed by a vote there, so the room read as locked while the founder had a ballot
42
+ // in it. The Board Room is awake for the whole of genesis; charter wakes no room.
43
+ charter: Object.freeze([]),
41
44
  // task 1005046: legalize woke Economy and legislation woke Ranks. Both pages
42
45
  // are Primer chapters now (one reading room), and the Primer never sleeps —
43
46
  // it is the newcomer's first read — so these two stages wake no sidebar room.