Skip to content

fix: online class times, Back hijack, path-embed outage fallback; delete dead icons - #351

Merged
Ardnived merged 11 commits into
mainfrom
claude/audit-fixes
Nov 1, 2026
Merged

Ardnived merged 11 commits into
mainfrom
claude/audit-fixes

Conversation

@Ardnived

@Ardnived Ardnived commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Fixes from a workspace-wide audit. One commit per behaviour. The owner approved each behaviour change. docs/embedding.md and CHANGELOG.md are updated in the same commits.

What changes

Commit Failure it prevents
fix(event) an online class reads in the viewer's time The weekday and date were the viewer's but the time was the host's: a Wed 19:30 Prague class read "Every Thursday · 7:30 PM" in Sydney, a time in neither zone. The main line is now all viewer time ("Every Thursday · 3:30 AM"), and the faded line gives the host's clock beneath it. An online class no longer triggers the ipwho.is lookup; the "classes near you" prompt still does. reconciledViewerPlace and the IP region/timezone fields are deleted.
fix(routing) home-region open replaces, not pushes The first open pushed ?atlas=/nl onto the host's history, so the visitor's first Back only moved the widget (regressed #112).
fix(routing) path embed degrades only for a refused key Any client-record read failure (a Railway deploy, a 5xx) dropped a routing=path embed to query routing. It blamed the record for a missing canonical embed, then wrote ?atlas= URLs under the prefix after "Try again". Only a refused key degrades now.
fix(routing) a path embed's read failure reaches the localized retry Every other failure then rethrew past App to RootBoundary, one line of untranslated English whose only way out is a page reload — where query mode answers the same clients/me 5xx with ErrorFallback, localized and with a retry. The boot surface renders that same screen, through ResetErrorBoundary: its QueryErrorResetBoundary is what makes "Try again" re-read the record rather than re-throw the cached rejection. ErrorFallback gains canReport, a surface limit beside its canNavigate: false — the report modal's host mounts below this point, so the action would open nothing.
refactor(icons) delete the brand marks nothing renders Logo, SocialIcon, ZoomIcon, GoogleMeetIcon, YoutubeIcon and BaseIcon were imported only by their own story and test.
refactor(loader) drop the classic-shim exports start and safeLoaderPath were exported for a shim that no longer exists.
fix(event) the host clock drops the duplicated city The faded line read "Wed 7:30 PM in Prague" directly under "Online • Hosted from Prague". The in %{city} clause earned its place while that line named the viewer's region; both lines name the host now. It is the bare clock, which unwires event.display.time_in_place — sydevs/SahajCloud#1057 removes the key, and translations.test.ts gains RETIRING_KEYS for the window between unwiring a t() and the sync that drops it.
refactor(event) delete the timeHint nothing reads EventDisplay.timeHint had no reader outside its own spec, and its JSDoc still called the 'viewer' value "load-bearing".
docs(embedding) the path-mode outage screen is the localized one Both guides described the reload notice a path embed no longer reaches, and neither stated the two limits a host would otherwise meet on an outage: the copy falls back to English if the outage took the translations too, and the screen offers no report control.

Tests

  • .claude/skills/pr-prep/check.sh --full: lint, typecheck, unit (157 files / 1898 tests), build and size all pass. Sizes: loader 2.8/3.5 KiB, embed 326.1/330, standalone 324.2/330 — unchanged, since the molecules barrel was already in the eager graph.
  • New useEventDisplay cases render the hook in Sydney. They fail with "Every Thursday · 7:30 PM" when the old time source is put back.
  • RETIRING_KEYS' own pin was watched failing in both directions: a key the sync already dropped, and one a call site asks for again.
  • Widget.path-boot.test.tsx is the first spec over PathBoot's boundary — jsdom, four cases, each watched failing against the defect it names: the rethrow, a bare ErrorBoundary (the read ran once, not twice), the report action left on, and a degrade arm that no longer matches a refused key.
  • Browser pass against the built embed (pnpm review:embed, /__review/pathmode, clients/me stubbed): a 500 renders the themed panel in the element's own box with one "Try again", and pressing it re-reads the record; a 403 still prints the canonical-embed warning and shows the configuration screen.
  • The home-region replace has no spec to extend (no FullInterface spec exists).
  • Deleting Icons.test.tsx also drops its two Lucide checks (currentColor, aria-hidden). Deleting timeHint drops three assertions; the zone and weekday assertions beside each were the real statement, and the Prague-viewer case now asserts the instant it shares with the Sydney one.

Notes for reviewer

The one open thread is answered and resolved: the reviewer chose A, so the path-mode retry is built here rather than ticketed.

Security review ran over the branch (src/Widget.tsx is a trigger path) and found nothing: the screen's text comes from ERROR_POLICY through t(), and the thrown developer string stays in reportContext, which no longer has a report action to travel through.

Sibling PRs (same audit)

🤖 Generated with Claude Code

Ardnived and others added 5 commits October 31, 2026 10:13
…'s clock beneath

An online class took its weekday and date from the viewer's zone but its
time from the host's, so a Wednesday 19:30 Prague class read "Every
Thursday · 7:30 PM" in Sydney. The time now comes from `next` too, so
the main line is wholly the viewer's ("Every Thursday · 3:30 AM"), as
the calendar and the date filters already were.

The faded line under "Online • Hosted from Prague" now gives the host's
own clock and city through `time_in_place` ("Wed 7:30 PM in Prague"),
with the short weekday only when the host's day differs, and only when
the two wall clocks differ. It replaces the viewer-region label, so
`reconciledViewerPlace`, the IP schema's `region` and `timezone`, and
the online-event trigger of the IP lookup are gone. The lookup itself
stays: the "classes near you" prompt, the recovery offer and the share
ordering still read it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first open navigated to the client record's home region (or a
path-mode `atlas` default) with a push, so a visitor's first Back press
only moved the widget back to the world list, against #112 and the
embedding guide's "mounting does not add a history entry". It now
replaces the root entry, so Back leaves the host page.

The guide's path-mode paragraph promised that Back returns to the world
list; it now says Back leaves the page, and the URL section says when
the widget writes the parameter on first open.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d key

`PathBoot`'s boundary rendered `<Atlas />` with no prefix for any throw
from the client-record read, so an outage or a 5xx dropped a
`routing=path` embed to query routing: a warning blamed the record for
a missing canonical embed, and once "Try again" succeeded the widget
wrote `?atlas=` URLs under the path prefix.

The fallback now degrades only when `classifyError` calls the failure
`config` (a refused key), which keeps App's own configuration-error
screen. Anything else rethrows to the RootBoundary's reload notice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`Logo`, `SocialIcon` (with `ZoomIcon`, `GoogleMeetIcon`, `YoutubeIcon`)
and `BaseIcon` were imported only by their own story and test. Their
files, `Icons.test.tsx`, the story's "Brand marks" section and the
atoms barrel's `export * from './Icons'` go. The Lucide usage gallery
and `Icons.usage.test.tsx` stay.

The guides that described the folder as holding brand marks, the
exported-barrel exception list, the SSR template pointer in
docs/testing.md and two comments naming `BaseIcon` or a long-gone
`symbols.tsx` now say what is there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`start` and the `safeLoaderPath` re-export existed for the classic
shim and its pin spec. The shim is gone and nothing imports either:
the loader spec imports the entry for its side effects, and
`literals.test.ts` reads `safeLoaderPath` from `./literals`. Both
exports and the comments describing the shim's `<head>` path go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-bot

sydevs-bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

recent dispatches
  • 18:49Z address-review · attempt 1 · session · done
  • 18:49Z address-review · attempt 1 · session
  • 19:02Z address-review · attempt 1 · session · done
  • 19:02Z address-review · attempt 1 · session
  • 18:53Z review-pr · attempt 1 · session · done

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Oct 31, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

Five named behaviours, net −284 lines, and the diff adds no file, hook, type or constant — every new piece is a deletion, so the builder's ladder has nothing to walk. Each change is separately revertable and listed in the body, so the bundling is not smuggling.

The event-time fix is right and now internally consistent: next is the display zone the weekday, the date and the calendar already used, and formatTimeRange reads both endpoints in it. Its new copy is the weak part. The path-embed fix is right to stop the silent mode downgrade, but it sends an ordinary network failure to the last-rung fallback. docs/embedding.md and CHANGELOG.md move with both, CSP row and privacy entry included.

Findings

  • should-fix src/hooks/use-event-display.ts:271 — the faded line repeats the city from the line above it. Thread below.
  • should-fix src/Widget.tsx:147 — a 5xx or an offline visitor now gets the untranslated last-rung panel with no retry, where query mode gets the localized one. Thread below.
  • consider src/lib/shape/event.ts:205 — EventDisplay.timeHint has no reader outside event.test.ts, and its JSDoc still calls the 'viewer' hint "load-bearing". Same dead-surface family as the two refactor commits. Outside the diff, so no thread.

What was checked

Read whole: use-event-display.ts, lib/time.ts, lib/shape/event.ts, EventFacts.tsx, PathBoot, App.tsx's boundaries, classifyError, loader/index.ts. whereSubtext's one reader gates on display.online and origin is online ? next : null, so dropping that guard is behaviour-identical. safeLoaderPath keeps loader/config.ts and literals.test.ts; isOnline and zoneCity keep callers; Icons.usage.test.tsx survives and the four docs follow it. No stale reconciledViewerPlace or #64 claim left on the branch.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread src/hooks/use-event-display.ts Resolved
Comment thread src/Widget.tsx Resolved
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 31, 2026
@sydevs-bot sydevs-bot moved this from Working to Pending in SYDevelopers Technical Roadmap Oct 31, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 31, 2026
@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Oct 31, 2026
The faded host-clock line read "Wed 7:30 PM in Prague" directly under
"Online • Hosted from Prague". The `in %{city}` clause earned its place
while the line named the VIEWER's region, a different place from the
host's; once the clock moved to the host's own zone both lines named the
same city and the clause carried nothing. It is now the bare clock.

That unwires `event.display.time_in_place`, and this repo cannot delete a
CMS key: sydevs/SahajCloud#1057 removes it from `sy-atlas-translations`
and the ten seeds. Until that ships, the key would sit in the snapshot
referenced by nothing, which `translations.test.ts`'s dead-key direction
refuses — so that spec gains `RETIRING_KEYS`, the mirror of the
`PENDING_KEYS` registry it already had for a key published ahead of its
call site. The window is real in both directions and only one of them had
a home. Its own pin fails the entry once the sync drops the key, or once a
call site asks for it again; both halves were watched failing.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYPMwt4U3zw69HxZTF
`EventDisplay.timeHint` had no reader outside its own spec, and its JSDoc
still called the `'viewer'` value "load-bearing" — a claim that stopped
being true when the surfaces that branched on it were replaced by reading
the display zone directly. Same dead-surface family as this branch's two
other `refactor` commits.

The three assertions on it go with it. Nothing is lost: each sat beside
the zone and weekday assertions that are the real statement, and the
Prague-viewer half, which asserted only the hint, now asserts the instant
and zone it shares with the Sydney viewer — which is what "physical
events never convert" actually means.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYPMwt4U3zw69HxZTF
A `routing=path` embed whose client-record read fails for any reason but
a refused key now reaches the last-rung screen. Both guides said what it
asks the visitor to do and neither said what it looks like: one line of
untranslated English, with no "Try again" control, on a non-English page
too. A host reading only the behaviour would expect the localized screen
query routing gives for the same passing 5xx, so the asymmetry is stated
rather than left to be discovered on an outage.

The CHANGELOG's online-class entry also still quoted "Wed 7:30 PM in
Prague" as the faded line.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYPMwt4U3zw69HxZTF
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
sahajatlas-design 6a4e908 Nov 01 2026, 07:10 PM

@sydevs-bot

Copy link
Copy Markdown
Contributor

Pushed 125cae6. The branch was already level with main, so there was no base merge to make.

Adopted — the faded line repeated the host city: 68f3fd8 renders the bare clock. That unwires event.display.time_in_place, which this repo cannot delete, so sydevs/SahajCloud#1057 removes it upstream and translations.test.ts gains RETIRING_KEYS, the mirror of its PENDING_KEYS, for the window between unwiring a t() and the sync. Resolved.

Asked — the path embed's last rung: a 5xx is an ordinary classified failure and belongs on the localized retry, not RootBoundary. Build it here, or ticket it. Open, and it holds the merge. 125cae6 states the notice is untranslated.

Joined — the review body's third finding: c92fb2a deletes EventDisplay.timeHint, which had no reader outside its own spec.

Lean gate green, 156 files / 1894 tests.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 31, 2026
@sydevs-bot
sydevs-bot enabled auto-merge October 31, 2026 19:21
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Oct 31, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 1, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 1, 2026
A `routing=path` embed sent every client-record failure but a refused key
past `App` to `RootBoundary`, whose `RootFallback` is one line of
untranslated English with no way out but a page reload. In query mode the
same `clients/me` 5xx reaches `ErrorFallback`, localized and with "Try
again", so a path embed answered a transient blip worse than a query one
for no reason: `RootBoundary` is the rung for a failure in what the app is
BUILT on, and a classified network failure is not one.

The boot surface now renders `ErrorFallback` itself, through
`ResetErrorBoundary` rather than a bare boundary — its
`QueryErrorResetBoundary` is what makes the retry re-read the record
instead of re-throwing the rejection React Query cached, and its composed
`onError` keeps the report that the boundary's `onError` carried. The
provider moves above the boundary so the screen is inside it. A refused
key still degrades to query routing.

`ErrorFallback` gains `canReport`, a surface limit beside its existing
`canNavigate: false`: this surface mounts above `ReportIssueModal`'s host
and above the theme root it portals into, so the report action would open
nothing.

`Widget.path-boot.test.tsx` is the first spec over this boundary. Each of
its four cases was watched failing against the defect it names — the
rethrow, a bare `ErrorBoundary` (the read ran once, not twice), the report
action left on, and a degrade arm that no longer matches a refused key.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjV2heZgC6TooMov6pV
The guides and the changelog entry both described the last-rung reload
notice, which a `routing=path` embed no longer reaches for a failure that
is not a refused key. Both now say what a visitor gets instead — the
widget's own error screen with a retry, the same one query mode shows —
and both state the two limits a host would otherwise discover on an
outage: the copy falls back to English if the outage took the
translations too, and the screen offers no report control, because the
report form mounts below the point where path mode waits.

`docs/rules/i18n-and-state.md`'s boundary section said `ErrorFallback`
renders only inside `App`.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjV2heZgC6TooMov6pV
@sydevs-bot

Copy link
Copy Markdown
Contributor

Pushed 6a4e908. The branch was level with main, so there was no base merge to make.

Adopted — A (the path embed's last rung): 2d5f101 renders ErrorFallback on the boot surface, through ResetErrorBoundary — its QueryErrorResetBoundary is what makes "Try again" re-read the record. A refused key still degrades to query routing. ErrorFallback gains canReport, false here because the report modal's host mounts below this point. Resolved.

Widget.path-boot.test.tsx is the first spec over that boundary: four cases, each watched failing. A browser pass over the built embed with clients/me stubbed showed the themed panel and a working retry at 500, and the configuration screen at 403.

6a4e908 rewrites what both guides said about the reload notice, and names the two limits a host meets on an outage.

Lean gate green, 157 files / 1898 tests. Build and size pass, unchanged. The branch security review found nothing.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 1, 2026
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 1, 2026
@Ardnived
Ardnived disabled auto-merge November 1, 2026 19:20
@Ardnived
Ardnived merged commit fb2526e into main Nov 1, 2026
29 checks passed
@Ardnived
Ardnived deleted the claude/audit-fixes branch November 1, 2026 19:21
@sydevs-bot sydevs-bot moved this from Awaiting to Done in SYDevelopers Technical Roadmap Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants