Skip to content

feat(ui): S7 People + Meetings/To-dos screens#70

Merged
EyalDelarea merged 6 commits into
mainfrom
feat/s7-people-meetings-ui
Jun 11, 2026
Merged

feat(ui): S7 People + Meetings/To-dos screens#70
EyalDelarea merged 6 commits into
mainfrom
feat/s7-people-meetings-ui

Conversation

@EyalDelarea

Copy link
Copy Markdown
Owner

What

Builds the §5 People (אנשים) and §6 Meetings & To-dos (פגישות ומשימות) screens for the CatchApp redesign — slice S7, UI only. Vanilla JS, no React. Frontend-only; no backend files touched.

The three read endpoints + one write endpoint these screens consume don't exist yet (being built in parallel). The UI is built strictly to the agreed contract and renders a graceful empty state on any 404 / error / empty, never crashing.

Screens

People (§5) — two-pane (list + sticky detail) on desktop, stacks on mobile.

  • Rows: per-name tinted initials disc (oklch tint hashed from the name), name + status badge (cold-lead--warn), next-step note, "קשר אחרון · N שיחות פתוחות".
  • Detail: avatar header + status, last-contact / open-threads rows, a "הצעד הבא" card with a source chip → S2 thread jump, and "פתח צ׳אט" / "+ משימה" (the latter intentionally static for this slice).
  • Empty state when there are no people.

Meetings & To-dos (§6) — two visually distinct columns (.duo), stack on mobile.

  • Meetings: a month calendar (today highlighted, event dots on days with meetings, prev/next month nav) + a day-grouped agenda timeline (rail + dots, time in dir="ltr" mono, owner, source chip).
  • To-dos: a checklist with a progress bar (done/total), round checkboxes that toggle optimistically via setTodoDone(id, !done) (revert on failure), source chip + due badge per row.
  • No Google-Calendar "connect" banner — that's the constitution-gated S8; this agenda is local-only.

Both reachable via new אנשים / פגישות ומשימות top-bar entries, wired into the existing navigate/popstate/hash state machine (#people, #agenda).

How it's structured (follows existing patterns)

  • lib/agenda.js (new, pure + tested): initials, hueFromName, avatarTint, peopleStatusMeta, groupMeetingsByDay, relativeDay, eventDaySet, buildMonthGrid, todoProgress. Date math is over the UTC calendar day so grouping + the month grid are deterministic. Colocated agenda.test.js19 cases.
  • lib/api.js: getPeople(), getMeetings(from?, to?), getTodos(), setTodoDone(id, done) — mirror the getScopes/putScopes/getToday style (throw on !ok, JSDoc'd shapes). setTodoDone PATCHes same-origin JSON so the CSRF guard passes.
  • lib/icons.js: users + target glyphs.
  • app.js: fetch-on-entry views with thin DOM + delegated wiring, mirroring renderSources/renderToday.
  • styles.css: token vocabulary only, RTL logical properties, numbers/dates dir="ltr", motion gated behind prefers-reduced-motion, two-pane/two-column at ≥900px.

Quality gate

  • npm run check ✅ (no fixes)
  • npm run typecheck
  • npm run build
  • npm test ✅ — 1307 passed (144 files), including the 19 new agenda cases

Verify steps (once backend lands, or now against empty states)

  1. npm run dev (or make dev), open the web app.
  2. Top bar → אנשים: list + detail; click a row to select; click the source chip in "הצעד הבא" → jumps to the cited message thread; "פתח צ׳אט" opens the chat summary.
  3. Top bar → פגישות ומשימות: calendar shows today + event dots; prev/next change the month; timeline groups meetings by day; tick a to-do → progress bar moves (optimistic).
  4. With endpoints absent today, both screens should show their empty states, not errors.
  5. Check RTL, dark mode, and reduced-motion.

Notes / couldn't verify

  • The four endpoints don't exist yet (expected) — verification of populated states is deferred to integration. Empty/error paths are exercised today.
  • Meeting day grouping is over the UTC calendar day (deterministic, tested), while displayed times use the browser locale. A meeting near a UTC midnight boundary could in theory show under the adjacent local day — fine for this UI-only slice; worth a glance once real data flows.
  • "+ משימה" on the People detail is static for this slice (no create-task endpoint in scope).

🤖 Generated with Claude Code

EyalDelarea and others added 6 commits June 12, 2026 02:45
Pure, DOM-free selectors over the /api/people, /api/meetings and
/api/todos payloads so the §5/§6 screens stay thin:

- initials / hueFromName / avatarTint — per-name oklch tinted disc
- peopleStatusMeta — Hebrew label + warn flag (cold-lead → warn)
- groupMeetingsByDay / relativeDay — UTC-day buckets, chronological,
  null-start meetings collected into a trailing bucket
- eventDaySet / buildMonthGrid — calendar event dots + month grid
- todoProgress — checklist done/open/pct

Date math is over the UTC calendar day so grouping + the grid are
deterministic and time-zone independent. Colocated test (19 cases).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`users` heads the People (§5) view + its empty state; `target`
marks the "הצעד הבא" card. currentColor-driven like the rest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
getPeople / getMeetings(from?,to?) / getTodos / setTodoDone(id,done),
mirroring the getScopes/putScopes/getToday style (throw on !ok, JSDoc'd
shapes). setTodoDone PATCHes same-origin JSON so the CSRF guard passes.
The endpoints don't exist yet — callers treat a throw as empty.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two new views wired into the navigate/popstate/hash state machine,
with אנשים and פגישות ומשימות top-bar entries:

- People: two-pane (list + sticky detail) that stacks on mobile.
  Rows show a tinted initials disc, status badge (cold-lead → warn),
  next-step note and "קשר אחרון · N שיחות פתוחות". Detail has a
  "הצעד הבא" card with a source chip → S2 thread jump, plus
  "פתח צ׳אט" / "+ משימה" (the latter static for this slice).
- Meetings/To-dos: a month calendar (today + event dots, prev/next
  month) and a day-grouped agenda timeline on one side; a checklist
  with a progress bar and optimistic round-checkbox toggles on the
  other. Local-only — no Google-Calendar connect banner. Source
  chips reuse the S2 thread jump.

Every fetch failure (the endpoints don't exist yet) renders a
graceful empty state instead of crashing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Tokenized, RTL-via-logical-properties styles for the new views:
shared entity chrome (nav/head/badge/avatar/source chip/empty),
the People two-pane split, and the agenda calendar + timeline +
checklist. Two-pane/two-column kick in at ≥900px; transitions are
gated behind prefers-reduced-motion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@EyalDelarea EyalDelarea merged commit f07b26d into main Jun 11, 2026
5 checks passed
@EyalDelarea EyalDelarea mentioned this pull request Jun 11, 2026
7 tasks
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.

1 participant