Repository navigation
fix(atlas): fit the start pages to a phone - #1147
Conversation
At 390px every start page was 488-627px wide. The progress meter cannot wrap, so it took the section-tab row past the viewport, and the open-items table hid its Next step column in its own sideways scroll - the button each page exists for was off the screen. Below 700px the meter drops under the tabs, which keep the underline their active marker sits on; each open item stacks into one block with a full-width button; and the tiles sit two to a row, smaller, so the list starts on the first screen. Moving the tiles below the list with `order` was rejected: it would leave them first in the keyboard's order. The stacked header had no gap under its actions, so "Public Map" sat on the Statistics heading. An odd last tile now takes the whole row. A class manager's lone tab read "Open items 4" beside the filter row's "All 5": it counts the whole list now, titled "Events", and the meter beside it still counts the open ones. The all-clear banner no longer sits over a list of recommendations without saying they are optional. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYon8GptJgxetgmaii
… event A manager named only on events holds no create grant, so their start page offered them nothing where every other home offers "Add new event". The button is there now, and opens the managers of the regions above their own events - nearest first, with their emails - instead of a create screen the server would refuse. Reading those details is one step past `mayReadManagerContacts`, which shows a class manager no region manager's at all (#908). Anton priced that on 12 Nov 2026 for this drawer alone, so the gate is the caller's own `manager` listings: nothing in the loader takes a region or a manager from the request, and the manager read selects the two columns the drawer renders. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYon8GptJgxetgmaii
… screen Payload pins the language button 40px from the header's edge below 769px, which is less than this file's wider gutter plus the account picture, so it covered half of it. It parks on its own hidden spacer now, one gap further in. The breadcrumb trail truncates each crumb but never the row, and nothing above it clips, so a deep trail - an admin opening a region from the overview - pushed the account picture off the screen and took the whole page sideways with it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYon8GptJgxetgmaii
`access.md` said two surfaces read a manager's contact details, both behind `mayReadManagerContacts`. A third now reads past it, so the gate alone is no longer the whole story there. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYon8GptJgxetgmaii
Reuse what the request already holds and stop the shared layer depending on one home: - `loadRegionContacts` reads the ancestor chain and each region's name off `getRegionTree`, which `loadOpenItems` has already resolved and memoised on this request. That drops a `regions` query and, more to the point, the second derivation of the hierarchy `regionTree`'s own docblock warns about. - `HomeHeader` takes an `action` node instead of `canCreate` and `contacts`, and `AskToAddButton` moves beside its loader. `shared/` no longer imports from a home, and the other two homes no longer carry a prop pair only one of them can use. - The all-clear banner calls the rows optional only when a recommendation is one of them. `counts.all` also counts up-to-date events, so it promised suggestions that were not there. - Nobody is listed as someone to email themselves. - The header's gap is declared across only, so stacking needs no override of it; the stacked row separator exempts all but the first cell instead of redrawing itself; and the localizer takes one logical offset rather than a mirrored pair. - The breadcrumb trail scrolls rather than clipping: Payload styles that wrapper for a scrollable trail, gradient included. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYon8GptJgxetgmaii
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYon8GptJgxetgmaii
|
🚅 Deployed to the SahajCloud-pr-1147 environment in sahajcloud
1 service not affected by this PR
|
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the size of #1140 and no larger: every hunk maps to an acceptance criterion, and the joined header fix shares both the file and the symptom. HomeHeader taking an action node in place of canCreate plus a home-specific prop is a smaller surface than what it replaces. regionContacts.ts says why it does not call getRegionManagers, and it is right — loadOpenItems memoises that map for an admin scope only, so the program home would pay for a full-atlas read. One gap: the drawer can name a deactivated manager as the person to ask.
Findings
- should-fix —
regionContacts.ts:86offersinactivemanagers as contacts.
What was checked
- Ladder on the new pieces.
AskToAddButtoncomposes Payload'sDrawerandTablethrough the repo's owntableColumn, asManagerContactsTable.tsxdoes;regionContacts.tsis narrower than the existinggetRegionManagers. - Traced the ordering by hand:
chainByIdreversed, min-distance, then Map insertion order through theflatMap— "nearest first" holds for a manager running events in several regions, and self-exclusion matches the spec's fixtures. - Checked the
## Change outlineclaim that the tab counts every event. Forrole: 'program',scopedEventsWhereismanager == callerand no standalone proposal entersrows, socounts.allis exactly that. scope.managerIdisreq.user.id, and none of the three reads takes a region or a manager from the request — the newaccess.mdparagraph holds.- No contract surface: no
payload-types.ts, noresponseTypes.ts, noatlas-url-contract.json, so no consumer to sync. - All three preview links 302 to the Cloudflare Access login for
pr-1147.cloud-preview.sydevelopers.com. This environment holds no service token, so they are unreachable from here and nothing is raised about them.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
An inactive manager is denied every operation by the access bypass, so they cannot add the event the drawer asks for. Where the nearest region lists only deactivated people, they were the only name offered. Every sibling "who to contact" surface already excludes them: the digest recipients, the verification reminder's manager lookup, and the invitation send. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWNW4BU6XFtH6XLkea
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWNW4BU6XFtH6XLkea
|
One finding from the adversarial review, adopted.
Merged Lean gate green: 3794 unit tests. Targeted specs: 44 passed ( 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZPCoKeK4D9eWfqzvE
A row stacked at phone width lost its headers: Payload's `Table` prints them once, above the first row, and nothing named the lines below. The Regions overview read as eight unlabelled values per region. `StackedTable` wraps Payload's `Table` and carries each cell's heading into the cell, so a stacked row reads as named lines. Payload has no responsive mode of its own — `Table` only scrolls sideways — so the wrapper is where this can live at all, and the element-level rules move out of the dashboard's stylesheet with it. What stays there is the widths this one table asked for. The overview's own column widths now reset when stacked: at 30% and 1% they squeezed the region's name and its Edit button into a sliver. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZPCoKeK4D9eWfqzvE
The region a manager looks after was a second line under their name, to keep a third column off a phone's screen. The table stacks into named lines there now, so the region is a column like the others and reads with its own heading. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZPCoKeK4D9eWfqzvE
`StackedTable` is where a phone layout for a CMS table lives now, so admin-ui.md names it rather than the dashboard's own stylesheet. Two comments beside the contacts loader still called its surface a drawer. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZPCoKeK4D9eWfqzvE
|
Three threads from your review built, one left open for you.
#1140 gained a criterion for a stacked table, and its first one now says modal rather than drawer. Merged 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
One thread from your review, answered. Nothing is pushed — your answer was B, so nothing changes here.
This PR waits on nothing now. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
`securityReview.triggerPattern` covered only `src/components/admin/SignIn/`, so a change that reads past the caller's access anywhere else under the admin components merged with no security review. PR #1147 did exactly that: it read managers' names and emails on the Atlas start page past `mayReadManagerContacts`. The pattern now names the whole folder rather than the seven files that read with `overrideAccess: true` today. A server field component answers a `form-state` request for a row the caller chooses, so any of them owes its own read gate (docs/rules/admin-ui.md, #1126). The hazard belongs to the folder. Closes #1153 Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Change outline
Components — the header stops deciding, and the program home decides
HomeHeadercarriedcanCreatefor three homes and grew a second prop only one could use, reaching into that home's folder for its type. It takes a node now.HomeHeader({ subtitle, title }) shared/HomeHeader.tsx - canCreate ? <AddProgramButton/> : contacts?.length ? <AskToAddButton/> : null + action: ReactNode # whatever the home offers AtlasAdmin no action AtlasRegion action=<AddProgramButton/> AtlasManager AtlasManager/index.tsx + canCreate → <AddProgramButton/> + contacts → <AskToAddButton contacts/> AtlasManager/AskToAddButton.tsx + neither → nothingAskToAddButtonopens Payload'sconfirmation-modalover the sharedManagerContactsTable— a notice naming a handful of people, not a surface to work in. That table now carries both callers:ManagerContactsTable({ rows }) ManagerContacts/ManagerContactsTable.tsx + region? → the Region column, where a row names one + lastSignIn? → the column, only where a row has it # the field description reports it; the modal does notContract — one stacked table for every CMS table
Payload's
Tableprints its header row once and otherwise only scrolls sideways, so a stacked row lost both its names and its off-screen column. Wrapping it is the only place either can be answered.StackedTable({ appearance, columns, rows }) helpers/stackedTable.tsx + wraps Payload's Table helpers/stackedTable.module.css + under 700px: table / tbody / tr / td → block # one block per row + every cell carries its heading as a label # a header row names the first row alone + the first column carries none # it is the row's own title + a cell's own button takes the row + an empty cell is left out, not named blank OpenItemsList · RegionOverviewTable · ManagerContactsTable + all three render through itBehaviour — what the start page says
Contract — the phone layout, below 700 px
Preview
Data: not seeded yet. This repo sets no
previewUrl.seed, so the preview carries only the manager the deploy provisions —?region=1needs a region to exist first. The class-manager start page and its "Add new event" modal need a manager named on events but on no region, which no preview starts with; the integration specs cover that path instead.Test results
.claude/skills/pr-prep/check.sh— lint, format, typecheck (src + tests), 3839 unit testsatlas-overview.int.spec.ts,manager-contacts.int.spec.ts)Manual verification
document.documentElement.scrollWidthis 390 on each start page.mailto:links.Notes for reviewer
Verified in a browser at 390 × 844 and 1280 against a seeded local database: both start pages and the region drill-down report
scrollWidth: 390, the first open item's button lands at y≈773 (on the first screen), and the desktop layout is pixel-identical tomain. That pass predates all three review rounds, whose changes are component-level and unverified in a browser here — the preview is the place to look at them.Seven other CMS tables could take
StackedTable. Ardnived chose a ticket of its own over building them here, so that work is #1151 — all seven named, with what each conversion needs. Nothing in this PR waits on it.Three findings from the adversarial review were dismissed, each with a reason:
--gutter-hscale instead of patching the two rules it broke.custom.scssflattens the vendor's 60/40/16 px gutter to a constant 24 px, which is the root cause of the localizer overlap — and, in principle, of every other vendor rule that assumes 16 px below 768 px. Changing it moves every admin page's gutter at phone width, which this ticket cannot verify. Worth its own ticket; say the word and I will file one.$breakpoint-s-width. 700 px is where this content stops fitting, which is not where the chrome switches; between 701 and 768 px the dashboard is still comfortable in its desktop layout. Kept the ticket's number..cell-action, #heading-actionbase rule in two so the phone rule needs no id weight. Two blocks with identical declarations merge back into one:is(), which restores the id weight the split was meant to remove. Kept the grouped rule and the comment that explains it.One behaviour worth a second opinion: the
SectionTabstick that stands in for a zero count now means "runs no events" on the program home rather than "nothing open". Unreachable today — a manager with no events gets theCenteredNoticebranch instead — so it is a note, not a defect.Detail
Why this surface reads past
mayReadManagerContacts. That gate shows a class manager no region manager's details at all (#908), which is the whole reason this ticket exists: the person who must ask for an event cannot see who to ask. The decision in the ticket (Anton, 12 Nov 2026) widens it for this surface only. What stands in for the gate is the caller's ownmanagerlistings — the loader derives every region from events the caller already runs, so a crafted request cannot name a region or a manager. Themanagersread selectsnameandemailand nothing else, underdocs/rules/access.md's projection rule, and that rule's section now says this surface exists so the next person to widen or narrow the gate finds it.The region chain comes from
getRegionTree, not a second walk ofbreadcrumbs.loadOpenItemsalready resolves and memoises the tree on this request, andregionTree.ts's own docblock says why one derivation of the hierarchy is the rule. The first draft re-derived it; the review pass removed that.Why a label per cell rather than a description list.
Tablerenders the<td>itself, so nothing here can swap the element — but it does take a pre-rendered node per cell, which is where the heading goes. The label is hidden by the stylesheet while the table is a table, so the real<th>still names the column on a desktop, and a phone reads the label instead. The first column is deliberately exempt: "Region: Pune" over the rest reads as one field among them rather than the row's title.Fixtures checked.
tests/int/manager-contacts.int.spec.tsbuilds a country → region → city tree with its own manager at each level, which is the shape the chain walk reads. Verified againstRegions.ts'sALLOWED_PARENT_LEVELS(a city may sit under a region or a country) and against the nested-docs registration insrc/lib/atlas/regionTree.ts, which is what populates thebreadcrumbsthe chain comes from. Each new assertion was watched failing against the defect it guards: the nearest-first ordering against an inverted sort, the self-exclusion against the condition removed, the loader wiring against a hard-coded empty list, and the deactivated manager against the unfiltered read.No migration, no schema change, no generated file touched.
Closes #1140
🤖 Generated with Claude Code
https://claude.ai/code/session_01Mg9rjZPCoKeK4D9eWfqzvE