ident
All repositories: gitoria
16.4 KB
# Report 012 — ident onto the layouts theme, mobile first — PARTIAL (WIP committed on w12-theme; not deployed, not pushed)Worker B3 (Sonnet), 2026-10-21. Stopped early on Atlas' quota order (80 %/85 %). The code move is done and compiles and serves; **the gateproof and the E2E walk are NOT finished** — see "Not done".## What changed- `theme/` = `git archive dbe3de7 theme` of layouts.worldapi.org, verbatim (theme.hl byte-equal to `git show dbe3de7:theme/theme.hl`; `shared/tokens.hl`byte-equal, cmp). (layouts HEAD 0573eed has a +3-line theme.hl change after dbe3de7; per the brief I copied dbe3de7.)- `deploy.sh`: `"node theme/check-theme.mjs ."` added to GATES (8th) and the summary line is exactly tickets' :106`grep -E 'passed,|^check-theme:' "$out" | tail -1 | sed 's/^/ /' || true`. `bash -n` ok. (No full dry run: it repeats the long gates.)- `.check-theme-ignore`: `lib/api-helpers.hl` (standalone error-page HTML string with its own colours, as tickets) and `testapp/` (not deployed).check-theme on the old styles + theme: 56 problems → **0** (37 files) after the move.- `components/main.hl` (shell): theme `AppHeader` (brand "ident") + `MainMenu` (Identities / Inbox / Apps, `current` set by each page) + `UserMenu`(`#whoami` = the account address, `#menusignout` "Sign out") + phone `Sidebar { desktop = "false" }` holding the same main menu, then`main { ContentFirst { slot } }` (hybriel#130 form). Signed in only: signed out the header is just the brand and there is no sidebar/toggle.Kept: the offline probe (`netProbe`, `/api/online`, `offlineNote`), `signedOutAll` push, `/avatar.js`.New: `shellSignOut` face (`shellSignOutNow`) — the user menu's Sign out clears the session and reloads `/`.- **Shell choice: ContentFirst for every page.** ident has no list→item structure (notes' ListFirst) and no folder column (ThreePane). Sign-inpages (`/`, `/code`, `/signin/<rid>`) are the same centred ContentFirst column with no sidebar, because there is nothing to navigate beforesigning in (header = brand only). Account pages (identities, apps, inbox, per-app settings) are the same column with AppHeader + MainMenu + UserMenu,the phone's ☰ sidebar carrying the menu. Reason for one shell: one column (`ident-card`, 34 rem / 46 rem wide) is what every page is.- `components/styles.hl` 150 → ~125 lines: `inherit '../theme/theme.hl'`; removed what the theme covers (base elements, links, headings, fields, buttons,`quiet`/`small`/`danger`, old header/nav/main, borders and the 0.4/0.5/0.6/1 rem radii). Kept only the app's own rules (ident-card column, accountbar, rows as `colorSurface` + radiusLarge, badges as filled radiusSmall pills at .875rem, app request, secret box, switches, inbox). Borderless: theunread-left-border, appRequest left-border, accent frames of the forms are gone (unread = the "new" badge). One `@media (min-width: 60rem)`.`account-bar a`, `note-foot a` get the 44 px min height; `application-header a.brand` min-width 44 (it was 43×44 in the first run).- `lib/api-helpers.hl` errorPage ("login button" error page, raw HTML): brand link 44 px high.- `components/start.hl`: `shellEmail = ''`, `shellIn = false` override so the precached `/start` never carries the address (the PWA gate checks it — NOT RUN on new).- Pages: `current = '/'`, `'/apps'`, `'/inbox'` (and `/inbox/:cid`); appsettings "Back to the inbox" paragraph is `class="links"`. Ids/tags kept for the gates.- **Embeddable pieces NOT touched:** `selector.js` (served `/selector.js`, the `<ident-selector>` element other apps embed, with its CORS calls`/api/selector/identities`, `/api/selector/choose`), `avatar.js`, `/login` button flow, `/api/*`. Nothing in ident serves an `ident-menu`(that element lives in tickets/notes/gitoria's own main.hl); the selector's look and API are unchanged.## Measured (real Chrome 390, copy of ident.worldapi.org-20261019-2203.tgz, account of the copy, code from the sink)Old (8e4f435), run 1 of tests/e2e-theme.mjs (the only complete old audit run; its json was lost — the run aborted at the sign-out step, see Not done):| page 390 | taps<44 old | inputs<16 old | header old ||---|---|---|---|| sign-in | 5 (brand 45×28, 3 nav links 23 px high, email field 41 px) | 1 (14.4 px) | 48 || code page / apps signed-out / login-error page | 4 / 4 / 1 | 0 | 48 || identities | 18 (nav 23 px, Sign out 33 px…) | 1 (tz 14.4 px) | 48 || identity form | 23 | 6 (14.4 px) | 48 || apps / inbox / app-settings / secret / invite choice | 21 / 13 / 9 / 25 / 6 | 0 | 48 || text < 14 px: 7–14 elements per account page (tagline 13.6, hints, keys) | | | |New, partial run (stopped by quota after two pages): sign-in **taps<44: 1** (brand 43×44 → min-width fixed afterwards, not re-measured), **inputs<16: 0**,**wider: 0**, text<14: 0, header 52 px, scrollWidth 390. No other new page was measured.Expected (not proven) per the brief: 0/0/0 — NOT claimed.## Gates (ports mapped into 8740–8749 by tools/rungate.sh: a rewritten copy tests-p/, deleted after; LC_ALL=C)| gate | old 8e4f435 | new ||---|---|---|| delivery | **49/0** (first complete old result) | not run || browser / apps / selector / migration / iplimit / notify | NOT valid: the first old runs died on cold-start (browser waits 20 s for the server) and on two orphan test-app servers of my own on :8741/:8742 (killed by PID); a rerun with the fixed script (cookie name `testapp8741sid`) was not done | not run || check-theme | – | 0 problems (37 files) |The expected numbers are 152/107/99/33/39/130/49; I have only delivery 49/0 on old.## E2E in lisbeth's Chrome — NOT completeTunnel `ssh -L 8747→lisbeth:9223 -R 8745 -R 8746`; ONE existing tab (about:blank, 4C906692…), Page.bringToFront, no /json/new, no clipboard (deleted only my own `identsid` cookie, never `clearBrowserCookies`). Old tree on :8745, new on :8746, own data copies, mail sink files.Old run 1: real sign-in (typed address, "Send me a code", code read from sink, typed, "Sign in") PASS at 390, apps register (typed) + secret PASS,invite link (POST /api/invites with the new app's key+secret, opened in the tab) PASS ("You are invited to …"), then "Sign out" timed out (see below).1280 and the new tree's walk (sidebar, user menu, sign out, sign out everywhere) were **not run to the end**. Shots: /media/STORAGE/claude-scratch/atlas/B3/shots/ — `old-390-*`, `new-390-signin|start.png`(PNG; I cannot view images; numbers only). One incident: during a rerun the shared tab was navigated by someone else (a HyperConductor page), so my rerun failed — another worker uses the same about:blank tabs.## Not done / left (next worker)1. The 7 gates old vs new, one at a time, with `tools/rungate.sh` (in scratch/B3/tools) after warming the server once (cold start > 20 s breaks browser.mjs); expect test edits in tests/browser.mjs for the header (`application-header .brand`, `nav a#navidentities/#navinbox/#navapps` selectors are gone: the menu is `main-menu a`, hidden on the phone in the sidebar; `.tagline` is gone), the sign-out in the user menu, `#meemail` unchanged.2. Shell-in-page risk to check first: `components/main.hl` declares `session`, `shellEmail`, `shellIn`, `current`; pages redeclare `session` and set `current`. I did not verify that hl:web merges these (page overrides parent) — the first signed-in render of the menu/user menu is UNPROVEN. The in-place sign-in on `/` (verify without reload) does not add the user menu until the next navigation (the shell reads the session at render).3. E2E: re-run `tests/e2e-theme.mjs` old and new at 390/1280 (`tools/e2e.sh`), with a tab nobody else uses. The old "Sign out" step timed out once in run 1 (old code, `#signout`): not diagnosed (DEBUG line added to the script).4. 1280 targets under 44 will be the theme's deliberate 36–38 px desktop buttons/menu links.Cleanup: servers, the ssh tunnel (pid 1264954) and gate leftovers killed by PID; `ss` shows nothing of mine on 8740–8749. The tab was left as the last page (e2e cleanup did not run on kill): about:blank navigation not done.Files: tests/e2e-theme.mjs, tests/mobile-measure.js (new); scratch tools: /media/STORAGE/claude-scratch/atlas/B3/tools/{rungate,chain,e2e}.sh, logs/, data copies (data-old/new, to delete).---## Continuation (worker B4, 2026-10-21) — PARTIAL again: step 1 proven (and found two Hybriel gaps), step 2 done, browser gate 152/0 on new; 6 gates, the audit rerun and the lisbeth E2E NOT done (request budget)Commits on w12-theme: 021dd0f (tests, shell notes) and the commit after it (startshell, browser gate green).### 1. The unproven parts, proven on the new tree (copy of ident.worldapi.org-20261019-2203, headless Chrome of my own, server :8746)- **session/email reach the shell: PROVEN.** A signed-in `GET /`, `/apps`, `/inbox` (curl with the session cookie) has `application-header` with MainMenu (Identities/Inbox/Apps), UserMenu and `#whoami` = [email protected]. (The shell reads `session` itself.)- **A page's members do NOT reach the shell: PROVEN, by design (hybriel COMPONENTS.md §5: "parents are their own mounts with their own state").**`current = '/apps'` in a page never marked the menu (aria-current="false" on every link); `shellEmail = ''` in start.hl never took effect: **the signed-in `/start` carried the address** (the PWA gate caught it: "NO email … in the offline cache" FAILED, 149/3 on the first run). Fixed in .hl: `/start` has its own parent `components/startshell.hl` (brand only, never reads the session, same probe/offline note).- **GAP (hl:web → Arachne): an event emitted by a page (`emit shellSession(email)`) is NOT delivered to the `on` handler of its parent shell**, and a page cannot change shell state. Minimal repro: `/media/STORAGE/claude-scratch/atlas/B3/probe/` (README.md, project.hl, components/main.hl + page.hl, probe.mjs; run `PROBE_PORT=8749 bin/hybriel project.hl`, then `node probe.mjs <cdp> <tab> http://127.0.0.1:8749/b`). Result: shell's own button changes `#who`/`#cur`/the MainMenu mark; the page button's emit changes nothing; SSR `#cur` stays empty although the page declares `current`.Consequences for ident: (a) after the IN-PLACE sign-in on `/` the header does NOT get the user menu until the next navigation (e2e check `right after the in-place sign-in the header has the user menu` FAILS on new — real, kept in tests/e2e-theme.mjs); same stale user menu after the in-place Sign out. (b) the MainMenu marks no current page. I removed my non-working `shellSession` events and the dead `current =` lines in the pages (STOP at the gap, no JS workaround). The shell's own `on probe` (animation) did not mark it either in ident (probe on /apps, 4 s): not diagnosed.Options for Atlas/Arachne: a documented parent-readable page member or a bubbling event; or ident reloads (`window.location.assign('/')`) after a successful in-place verify/sign-out (changes the first-login welcome flow, not done).- 390 audit fixed: `account-bar a` min 44×44 (the appsettings "Inbox" link was 43×44).### 2. tests- tests/browser.mjs: cold start waits `IDENT_COLD_MS` (default 120 s, was 80×250 ms = 20 s); `/start` header check uses `application-header a.brand`; palette check: brand is the theme's strong text rgb(245, 250, 255) (was accent orange) — no `nav#navidentities`/`.tagline` use remained in the file.- tests/e2e-theme.mjs: checks for the in-place header, #whoami, the menu mark (waits 5 s).### 3. Gates (ports 8740–8749 via tools/rungate.sh; orphan check `ss` before each run)| gate | old | new ||---|---|---|| browser | 152 (expected) | **152/0** (first run 149/3 → address in /start cache, brand colour, /start nav selector; all fixed; the 20 s start problem fixed) || apps, selector, migration, iplimit, notify | expected 107/99/33/39/130 | NOT RUN || delivery | 49/0 | not rerun || check-theme | – | not rerun after the last edits (startshell.hl is new: run it) |### 4. 390 audit, new, my headless Chrome 390 (run before the last fixes, all pages of the walk): taps<44: 0 on every page except app-settings "Inbox" 43×44 (fixed since, not re-measured); inputs<16: 0; wider than 390: 0; scrollWidth 390; header 52 px. Old: see the table above (5/4/4/1/18/23/21/13/9/25/6 taps<44).### 5. E2E in lisbeth's Chrome: NOT run (no lock/tunnel used); only my own headless Chrome on :8748 (PID saved/killed). No PNG viewed (cannot). Shots in B3/shots/new-* from the headless run.### Left1. Decide the two gaps (Arachne / reload). 2. Gates apps/selector/migration/iplimit/notify/delivery + check-theme on new, old-vs-new numbers. 3. Re-measure 390 on every page (e2e-theme.mjs ends at the sign-out-everywhere step: the run stops at "no button.user-toggle" after the in-place re-sign-in, i.e. the gap — reload before that step). 4. Lisbeth E2E (lock) at 390 and 1280. 5. Re-run e2e after fixing; kill nothing else.---## Part 3 (worker B5, 2026-10-21) — gates 7/7 old and new, 390 audit 0/0/0 in REAL Chrome, E2E 390 + 1280 PASS (2 known gaps), stopgap reload built### Gates (tools/rungate.sh, ports 8740–8749, IDENT_COLD_MS=150000, ss checked before each run)| gate | old 8e4f435 | new w12-theme ||---|---|---|| browser | 152/0 | 152/0 (rerun after the last CSS edit too) || apps | 107/0 | 107/0 || selector | 99/0 | 99/0 (rerun after the CSS edit) || migration | 33/0 | 33/0 || iplimit | 39/0 | 39/0 || notify | 130/0 | 130/0 || delivery | 49/0 | 49/0 || check-theme | – | 0 problems (38 files) |Harness bugs found (not app bugs): (1) apps/invites/notify/selector/migration waited only 20 s for a cold server (load ~30) → now `IDENT_COLD_MS` like browser.mjs (new tree's tests; the old apps run used the same one-line wait edit); (2) rungate.sh did not map ports in tests/oldstore-009.hl → migration stopped at 18/1 on old AND new (Bob app origin 8397); fixed in the script (file restored after). Old first runs of apps failed for (1) and were rerun.### Stopgap (Atlas/Arachne OK, until hybriel#193) — components/home.hl, commented "stopgap until hybriel#193"Sign-in of an existing account → `window.location.assign(homeUrl)`; Sign out and Sign out everywhere → `assign(homeUrl)`. First login (new account): the welcome form stays in place, Skip/Save ends with the reload (so the welcome flow is intact; the "Identity saved" notice of the welcome save is gone, the browser gate checks the reload + user menu instead). Cost: the "Signed out on every device." notice is gone (reload).### 390 audit, real Chrome (lisbeth, new tree), 12 pages: taps<44 **0**, inputs<16 **0**, wider than 390 **0**, text<14 **0**, scrollWidth 390 everywhere, header 52 px. Old (report above): 5/4/4/1/18/23/21/13/9/25/6 taps<44, 1–6 inputs<16 on forms.Two REAL regressions that headless Chrome had missed, found in lisbeth's Chrome and fixed in styles.hl: brand link 43×44 (the theme's `application-header > a.brand {min-width:0}` outranked my rule → `html application-header > a.brand`), and the identity form 413 px wide at 390 (a file input's intrinsic width → min-width:0 on grid/flex items, file input 100%). The app-settings Inbox link is 44×44. 1280: sub-44 are the theme's 36–38 px desktop buttons/links only (Send me a code 544×36 etc.), as expected.### E2E in lisbeth's Chrome (lock held, ONE existing tab chosen fresh from /json: about:blank else a page of a local test app, never /json/new, left at about:blank; own tunnel -L 9223 + -R 8746; copy of ident.worldapi.org-20261019-2203.tgz, codes from the sink)390: sign-in (typed, code from sink), identities, sidebar (3 links), tap Apps, user menu (+Escape), sessions, app registration (+secret once), invite (choice page), Sign out, sign-in, user-menu Sign out, sign-in, Sign out everywhere, first login (welcome form, Skip) — all PASS, header has/lacks the user menu right after each step (stopgap). 1280: same walk, 22/22 PASS. Console errors 0.KNOWN GAP (expected fail, hybriel#193): the main menu / sidebar `current` mark (3 checks per width, TIMEOUT 3 s), nothing else. Flaky only under load (a click right after a reload on a cold server; reruns pass): sink wait now 40 s.Shots: B3/shots/new-390-*.png, new-1280-*.png (+ new-*-welcome, signed-out, user-menu, sidebar, app-form). I cannot view PNGs; only the numbers above. No old-tree E2E rerun (budget); old audit = the table in part 1.### Commits (w12-theme): "stopgap reload…, gates wait for cold start, welcome end reloads" and the one after (styles fixes, e2e-theme.mjs: auto tab, WIDTHS=, known-gap, welcome, covered-click debug).### Left: hybriel#193 (then remove the stopgap and the `gap()` checks); main-menu current mark; real-device check; deploy (not done, no push).Cleanup: my servers and both tunnels killed by PID, data copies deleted, ss shows nothing of mine on 8740–8749.
Branches
Latest commits
- 0f6d1592Merge branch 'f18b-shell-session' into mainIdent
- 19868218|||PR ident#39 shell reads its session member instead of a cross-file emitmre
- 5d1b3fedMerge branch 'v61-day61' into mainIdent
- 83faeb15|||PR ident: vendor Hybriel day61mre
- b2572b34Merge branch 'v59-day59' into mainIdent
- 67cf016d|||PR ident: vendor Hybriel day59mre
- 600c043dMerge branch 'v58-day58' into mainIdent
- 365f8c80|||PR ident: vendor Hybriel day58mre
- 585126e5Merge branch 'f16-setf' into mainIdent
- 953bf03a|||PR ident setF mirror dropped (hybriel#370)mre
- a1419d9cMerge branch 'f15-navigate' into mainIdent
- 3b3e451f|||PR ident#36 navigate to the app instead of location.assignmre
- e36f4516Merge branch 'f14-online' into mainIdent
- 2c5eac91|||PR ident#38 online state without probe timermre
- bf1980f2Merge branch 'v56-day56' into mainIdent
- 62ae0adf|||PR ident: vendor Hybriel day56mre
- 0d18abc4Merge branch 'f13-avatar' into mainIdent
- 2a99730a|||PR ident#37 avatar in hlmre
- fa4ed25bMerge branch 'f11-upsert' into mainIdent
- 8f3d9bc9|||PR ident#42 keyed upsert and removemre