Skip to content

MusallahBoard v3 console: Add board, setup files and USB kits - #12

Merged
IbraTech04 merged 6 commits into
developfrom
claude/wizardly-curie-s90b5i
Nov 19, 2026
Merged

IbraTech04 merged 6 commits into
developfrom
claude/wizardly-curie-s90b5i

Conversation

@IbraTech04

Copy link
Copy Markdown
Collaborator

Console half of the MusallahBoard offline-first restructure. Pairs with:

  • LensBridge/LensBridgeBackend: endpoints
  • LensBridge/agent: board side

Changes

  • Add board (/admin/devices/new) replaces "Enroll new device". It creates the board straight away; no board hardware is needed yet.
  • USB stick downloads on the device page:
    • full USB kit, setup file only, or content only
    • days field up to 92
    • offline by default, with an "Online setup" checkbox
    • volunteer instructions shown inline and as a printable card
  • All-boards USB kit on the device list, and a "USB only" badge for boards that have never connected.
  • The maintainer "enroll over SSH" token moved to the device page and is now bound to that board.
  • Poster date fix: dates were sent as UTC midnight, so in Toronto a poster appeared the evening before its start and disappeared a day early. Dates are now whole local days, end date included. Existing posters may show a last day one earlier than before; that is the day boards actually stopped showing them.
  • The broken Slideshow tab is removed. It called a removed endpoint; FramesEditor and getDevicePayload went with it.
  • docs/ADMIN_API.md deleted, since it described endpoints that don't exist.
  • src/api/schema.d.ts regenerated against the new openapi.yaml.

Testing

  • npm ci && npm run build && npm test pass, 46 tests.
  • New tests: posterDates.test.mjs and usbKit.test.mjs.
  • npm test now runs with TZ=America/Toronto.
  • Lint errors are unchanged from develop (21), none in new files.

Generated by Claude Code

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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T16:37:41.526678Z 19a2514 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/utils/posterDates.js
Comment on lines +40 to +42
export function isoToStartDate(iso) {
const date = iso ? new Date(iso) : null;
return date && !Number.isNaN(date.getTime()) ? localDay(date) : '';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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
@IbraTech04
IbraTech04 merged commit 5bd57e0 into develop Nov 19, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants