Repository navigation
MusallahBoard v3 console: Add board, setup files and USB kits - #12
Conversation
The tab previewed a board's slides through GET /api/musallah/payload, which the backend removed, so it only ever showed an error. The backend has no preview endpoint to point it at, so it goes, with getDevicePayload and the frame-type table only it used. schema.d.ts is regenerated from the v3 backend's openapi.yaml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YY5BHXmNUhs48eubkKCNuE
A poster's dates went to the backend as UTC midnight, so in Toronto a poster showed from the evening before its start date and was gone on its end date. Boards build each day's slides from the posters overlapping that day, and an offline board carries weeks of days, so the end date decides when a poster stops (contract C6). The start date now begins at local midnight and the end date runs to the next one; the editor shows the last day the poster is on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YY5BHXmNUhs48eubkKCNuE
It described an API (/api/admin/boards, /api/admin/login) that never existed; the contract is the backend's openapi.yaml and src/api/schema.d.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YY5BHXmNUhs48eubkKCNuE
Devices -> "Add board" (name, audience, location, prayer method) creates the board before it is ever switched on, then offers its USB kit. Offline is the default; "Online setup" puts the backend URL and a new claim secret in the setup file for a board that will have a network. The device page's offline bundle panel becomes a USB stick panel: the USB kit (content for up to 92 days, the latest board app and agent, optionally the setup file), the setup file alone, or the content alone, with the steps for the volunteer inline and as a printable card: "Plug the stick into the board, wait for 'Set up as <name>', remove it." The device list gets a USB kit for every board, and a board that has never connected shows "USB only". Token enrollment moves to the device page as the maintainers' path; its token now binds to that board. The standalone "Enroll new device" page goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YY5BHXmNUhs48eubkKCNuE
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19a2514d53
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export function isoToStartDate(iso) { | ||
| const date = iso ? new Date(iso) : null; | ||
| return date && !Number.isNaN(date.getTime()) ? localDay(date) : ''; |
There was a problem hiding this comment.
Preserve existing poster instants when dates are not edited
For existing posters created with the previous UTC-midnight conversion, opening and saving an unrelated field now silently changes the schedule. In America/Toronto, 2026-11-20T00:00:00.000Z becomes the editor date 2026-11-19, which converts back to 2026-11-19T05:00:00.000Z, moving the start 19 hours earlier. PostersEditor.handleSave passes the entire form to BoardService.updatePoster, so even a title-only edit triggers this change; the end instant can move as well. Preserve the original instants when the corresponding date fields are unchanged, or explicitly migrate legacy schedules rather than rewriting them incidentally.
Useful? React with 👍 / 👎.
A poster saved before the local-day fix carries UTC-midnight instants, which the editor shows a day early in Toronto. Saving any field sent both dates back as local days, so a title-only edit moved the poster 19 hours earlier. An edit now sends startTime or endTime only when that date differs from the one the editor opened with; the PATCH leaves an omitted instant as stored. New posters and changed dates are still whole local days, end included, and the new-poster form defaults to the local today rather than UTC's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YY5BHXmNUhs48eubkKCNuE
CI checked out the backend's default branch, master, and compared the generated client with its openapi.yaml. Backend develop runs ahead of master, so every PR into develop failed. The contract now comes from the backend branch of the same name: the PR's base branch, or the pushed branch, falling back to master when the backend has no such branch. Pushes to develop run CI too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YY5BHXmNUhs48eubkKCNuE
Console half of the MusallahBoard offline-first restructure. Pairs with:
Changes
/admin/devices/new) replaces "Enroll new device". It creates the board straight away; no board hardware is needed yet.FramesEditorandgetDevicePayloadwent with it.docs/ADMIN_API.mddeleted, since it described endpoints that don't exist.src/api/schema.d.tsregenerated against the newopenapi.yaml.Testing
npm ci && npm run build && npm testpass, 46 tests.posterDates.test.mjsandusbKit.test.mjs.npm testnow runs withTZ=America/Toronto.Generated by Claude Code