Repository navigation
Description
The goal
A volunteer who manages their organisation's atlas sees their brand colours on the real map while they choose them, without saving and checking their site afterwards. The atlas itself makes sure that whatever colours they pick, the map's pins, the selected class and the text stay readable for visitors. Registrant emails stay readable with any colours too, and the volunteer can see what an email will look like before anyone receives one.
Why it matters
Today a volunteer picks three colours in SahajCloud with no way to see the result. To find out what visitors see, they have to save and go and look at their own site. Many never customise at all, so most atlases look the same. Those who do customise can make the map hard to use, with pale pins that disappear against the map or a selected class that looks like every other one. Some of our own default colours are already too pale against white. We want customising the branding to take as little effort as possible, so that more volunteers do it.
What success looks like
- A volunteer who opens their service's Atlas tab sees a live preview of the atlas open beside the form, on their own region, without clicking anything.
- Moving a colour picker repaints the preview straight away, before saving.
- The volunteer can switch the preview between the light and dark looks of the atlas.
- When the atlas has to adjust a colour so it stays readable, the volunteer sees the colour visitors will actually get, with the reason, and can use it with one click.
- On both the light map and the dark map, a pin and a group bubble carry a ring drawn in their own colour, and both maps paint the same marks. (Reworded 2026-11-18 to the rule fix(ui): brand colours that read in both modes, ringed pins, a per-mode palette report #399 shipped, which replaced the checked black-or-white edge.)
- A pin keeps the colour the volunteer chose, except that a very muted colour is lifted just enough to stay visible. (Reworded 2026-11-18 to the rule fix(ui): brand colours that read in both modes, ringed pins, a per-mode palette report #399 shipped.)
- The selected class stands out at a glance from the ones around it, on both maps.
- Every label and chip the atlas paints in a brand colour can be read on a phone, on both looks, down to the smallest text in the side panel.
- Registrant emails show readable text on their coloured header and buttons, whatever colours a service chose.
- Beside the logo and support email, the volunteer can open a sample registrant email with their logo and colours, which redraws within about a second of their last change, with no save and no reload. (Reworded 2026-11-18: the sample sits in a section that starts closed, which stays.)
- Once a mailing-list password is saved, the field shows only that a key is set and its last four characters. Reloading the page, reading the page source, or opening the preview never shows the rest of it.
- On the other tabs of a service, which only administrators see, the preview panel closes by itself, and an administrator who opens it again there is told it works on the Atlas tab only.
- If the preview cannot load — the frame is blocked, the atlas is unreachable, or the service's region has nothing published yet — the panel says what happened instead of showing a blank rectangle. (Moved to feat(clients): explain an Atlas-tab preview that cannot load SahajCloud#1201, 2026-11-18.)
Not included
- Previewing the atlas on the service's own website. The preview shows the atlas on sahajatlas.com, so it shows the colours accurately but not how the map is sized or placed on their site.
- Rejecting a colour. Nothing ever stops a volunteer from saving; the atlas adjusts instead.
- Rewriting a colour a service already saved. The atlas adjusts what it paints; the stored colour changes only when the volunteer accepts a suggestion.
- Changing the colours used in emails. Emails keep the exact colours chosen; only the text on them changes to black or white so it can be read.
- Telling a service still using our own colours that those colours have changed. The improvement ships quietly.
- Colour suggestions taken from the uploaded logo. Considered only if few volunteers customise after this ships.
- Removing the "Brand Colors" and "Registrant Emails" headings and renaming the colour fields. Handled separately.
- The colour swatches on the Install tab, which stay as they are and may show a colour the atlas then adjusts.
- Measuring how many services customise their branding.
Decisions
- Should the mailing-list password fix be its own, earlier ticket, even though that puts two tickets in one repo? → Yes. Keeping it separate lets the password fix ship before the preview that would otherwise expose it (Ardnived, 2026-11-11)
- How should the atlas make sure a pin is visible on the map? → Give the pin an outline, and check the outline. The pin keeps the colour the volunteer picked, and the edge is guaranteed against any background (Ardnived, 2026-11-11)
- What do we do about our own colours? → Fix ours quietly. Less work, but a volunteer may notice their map changed colour and have no idea why (Ardnived, 2026-11-11)
- Does the sample registrant email stay in this goal? → Yes. The volunteer sees everything their branding touches in one place, which is what the goal promises (Ardnived, 2026-11-11)
- On the other tabs of a service, which only administrators see, should the preview just close, or also explain itself? → Close and explain. An administrator who opens the panel on the wrong tab is told why it is empty (Ardnived, 2026-11-11)
- Lines 5 and 6 describe the pin-edge rule that fix(ui): brand colours that read in both modes, ringed pins, a per-mode palette report #399 replaced. Reword them, or ask for the check back? → Reword them to the shipped rule. (Ardnived, 2026-11-18)
- Should the sample registrant email open by default? → No, it stays in a section that starts closed. (Ardnived, 2026-11-18)
- What carries on once this goal closes? → The preview's three failure messages, as feat(clients): explain an Atlas-tab preview that cannot load SahajCloud#1201. (Ardnived, 2026-11-18)
Open questions
None. Every decision this goal needs is settled.
Notes
- Related goal: Volunteers set up the atlas on their own site, Wix included, with searchable links #348 — the guided setup screen whose Install tab links volunteers to the Atlas tab for colours, emails and the mailing list.
- Delivered by three implementation tickets: feat(clients): make the mailing-list API key write-only SahajCloud#1109, feat(ui): legible brand colours, previewed live from SahajCloud #389 and feat(clients): live-preview a service's colours on the Atlas tab SahajCloud#1110, merged as feat(clients): make the mailing-list API key write-only SahajCloud#1127, feat(ui): legible brand colours, previewed live from SahajCloud #392 and feat(clients): live-preview a service's colours on the Atlas tab SahajCloud#1129.
- A fourth PR, fix(ui): brand colours that read in both modes, ringed pins, a per-mode palette report #399, changed the map's edge rule and the report's shape after feat(ui): legible brand colours, previewed live from SahajCloud #392 merged. Two success lines above describe the rule it replaced.
Technical notes
TL;DR
- Shipped in four PRs: the write-only key, the ladder and the preview session, the Atlas-tab panel, then fix(ui): brand colours that read in both modes, ringed pins, a per-mode palette report #399, which replaced the map edge and split the report per mode.
- Risky: fix(ui): brand colours that read in both modes, ringed pins, a per-mode palette report #399 retired the measured basemap edge on pins and bubbles, so success lines 5 and 6 no longer describe the code. Nothing checks a mark against land or water.
- Open: the panel explains two refusals. A blocked frame, an unreachable atlas and an empty region still paint nothing.
The map edge: what #399 replaced, and what bounds a fill now
MARKER_OUTLINE and BASEMAP_SURFACES survive (atlas markers.ts), but reach only vagueRingLayer and vagueDotLayer. A pin and a bubble carry a translucent ring of their own colour instead — ringOf is +21 L, −16 S, capped at L92, drawn at RING_OPACITY 0.706.
⚠ markers.outline.test.ts asserts the art carries no black or white stroke, and PALETTE_CHECKS's own comment states there is deliberately no basemap check. So nothing measures a mark against land (#f3ead8 / #5a8bbf) or water (#78bced / #33567a).
⚠ MARKER_MODE = 'light': both basemaps take the light palette, so a mark is identical on the two maps.
What bounds a fill instead, all in buildRole:
| Bound | Value |
|---|---|
| saturation | clamped 40–60, read from chroma × 2, not HSL s |
| solid lightness | light 20–80, dark 60–90, plus a reach margin off each extreme |
surface |
step 9 ≥ 3:1 against #ffffff (light) / #121212 (dark) |
Only #000000 reads as unset now (isBrandSeed, mirrored by SahajCloud's isBrandColor). A grey or near-white is painted as chosen.
The six checks, and the report both repos agree on
PALETTE_CHECKS: panel-text · surface · selected-distinct · saturation · near-white · near-black.
Report per role: { entered, light, dark, suggested, lightAdjustedBy, darkAdjustedBy }. The adjustedBy union #389 specified is gone; #1129 was its only reader.
suggestedis a seed that renders itself (settledSeed),nullwhere onlypanel-textmoved — that check moves a ladder step no seed can express.- ⚠ SahajCloud's
readSwatchfilterspanel-textout, so a palette adjusted only by it shows no banner at all. Its swatch is identical to the colour entered, so there is nothing to show — but the volunteer is also not told anything moved. - Our three defaults render unchanged.
palette.defaults.test.tsholdsglobals.csstobuildScale(DEFAULT_SEEDS).
What the panel cannot explain
LivePreviewUnavailableReason: atlas-tab-only · no-atlas-role · no-key · no-path · no-region · not-reviewable.
None covers a frame the host blocks, an atlas that is down, or a region with nothing published. The CMS cannot observe any of the three from the admin side — the iframe just fails to paint. sydevs/SahajCloud#1129's own body flags this as the one acceptance line it left short.
Email text, the sample, and the key
EmailLayout's header title and filledBrandButtontakebrandTextColor(colors)→readableTextOn(primary, light).primarydecides while both candidates clear AA-large across every stop; the worse stop decides otherwise. ⚠color1is the only stop Outlook desktop paints, which is why it goes first. Our own two project gradients flipped white → black as a result.- Sample:
POST /api/clients/:id/email-previewrenders the real template server-side, 500 ms after the last keystroke, into<iframe sandbox srcDoc>. ⚠ It sits inside aCollapsiblewithinitCollapsed, so the volunteer opens it once. Each render is a full server-side render, and an ungated effect billed one on every Atlas-tab visit. secretField()(SahajCloudsrc/fields/secretField/):read: () => false,admin.disabled,payload.encryptat rest. The key is staged throughPOST /api/clients/:id/secrets/<path>and applied on the page's own Save;GETanswers{ last4 }. Two migrations: encrypt the column, then dropmailing_list_enabled— the checkbox is gone, and choosing a provider is what turns the list on.
What each ticket delivered
| Ticket | PR | Landed |
|---|---|---|
| sydevs/SahajCloud#1109 | #1127 | Write-only, encrypted mailing-list key as a reusable secretField() |
| #389 | #392 | The ladder's checks, the palette report, the clients preview session |
| sydevs/SahajCloud#1110 | #1129 | Atlas-tab live preview, the adjustment banner, the email text rule, the sample |
| — | #399 | Saturation and tone bands, per-mark rings, light palette on both maps, per-mode report |
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Projects
- StatusShow more project fieldsDone
Activity
sydevs-bot commentedon Nov 11, 2026
🤖 no session running
approved by Ardnived
recent dispatches
Written by the sydevs dispatcher. Sessions never edit this comment.
sydevs-bot commentedon Nov 11, 2026
Reviewed from three angles. Measured the goal's one unknown: the two map backgrounds.
The pin check does not work as #389 writes it. Today's own defaults fail it in 5 of 6 cases. When two colours share a hue, no correction can satisfy it and still keep the selected class distinct. The numbers are in the technical notes.
Also changed: nine success lines became twelve a non-developer can check. The three-ticket split is now a recorded decision.
Needs you: four decisions in
## Open questions— the pin rule, our own colours, whether the sample email stays, and the other tabs. Reply like@sydevs-bot revise 1A 2A 3A 4A.Next: once nothing is open,
@sydevs-bot implementadjusts the three tickets and starts them.🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
Ardnived commentedon Nov 11, 2026
@sydevs-bot revise 1A 2B 3A 4A
And update the child implementation tickets as needed to by in sync with these changes.
7 remaining items
sydevs-bot commentedon Nov 11, 2026
Both out-of-sync children are updated. sydevs/SahajCloud#1109 needed no change.
Build order
clientspreview session.What changed. #389 drops the
basemapcheck for a fixed outline, stroked where the marker art is built so an unbranded embed is edged too.selected-distinctmoves out ofbuildScale, which cannot see two roles at once. At hue 184panel-textpasses only below 14% saturation, so our teal seed stays and the correction carries it. sydevs/SahajCloud#1110 loses itsbasemapsentence, mirrorscolor2andcolor3only, and must re-apply its preview target after a save.All three are approved and the build starts now. sydevs/SahajCloud#1110 starts when its two blockers close.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
sydevs-bot commentedon Nov 11, 2026
Approved 3 implementation ticket(s). sydevs/SahajCloud#1109, #389, sydevs/SahajCloud#1110 build together now, and merge in order.
🤖 sydevs dispatcher
sydevs-bot commentedon Nov 11, 2026
Built all three children. Draft PRs, in merge order:
⚠ The order is load-bearing between 1 and 3: Payload's live preview posts the whole form state, so #1129 before #1127 would send a service's provider secret to sahajatlas.com.
Two things for you, both in the PR bodies:
colord/plugins/labis the cost, and every embed owesselected-distinct. These notes estimated ~10 KiB of headroom; there was none.Nothing on the map or in a browser was verified — no Mapbox token in the committed
.env.🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
sydevs-bot commentedon Nov 13, 2026
What shipped. Nine of thirteen success lines are met. The Atlas tab opens the preview on the service's own region, pickers repaint it live, a Light/Dark toggle switches it, and a banner names the colour visitors get with a one-click Use adjusted colors. The mailing-list key is write-only and shows only its last four. Emails pick black or white text. Other tabs close the panel and say why.
Two lines describe a rule you replaced. #399 dropped the checked black-or-white pin edge for a ring of the mark's own colour. Nothing now measures a pin or a bubble against land or water, a muted colour is lifted into a saturation band rather than kept, and both maps paint the same marks. Reword lines 5 and 6, or ask for the check back.
Two lines are short. The panel explains a service with no atlas and a wrong tab, never a blocked frame, an atlas that is down, or an empty region. The sample email sits behind a collapsible that starts closed.
Leaving the goal open.
@sydevs-bot implementplans whatever you want built.🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
Ardnived commentedon Nov 18, 2026
Answered in the terminal by @Ardnived:
Closing as completed with the Sahaj Atlas launch milestone.