An open source design system that's fully customizable and agent ready
TypeScript
spec(Schedule): a busy month day shows a count that opens the whole day (#7049)
Cindy Zhang7b8bd1953a4d
diff --git a/packages/lab/src/Schedule/Schedule.spec.md b/packages/lab/src/Schedule/Schedule.spec.mdindex d3de895b32..42cabadae0 100644--- a/packages/lab/src/Schedule/Schedule.spec.md+++ b/packages/lab/src/Schedule/Schedule.spec.md@@ -7,7 +7,7 @@ authority: currentarchive_reason: nullsuperseded_by: nullapproved_by: cixzhang-approved_at: 2026-10-04+approved_at: 2026-10-06owners: [cixzhang]review_triggers:[public-api, behavior, layout, scrolling, layering, accessibility]@@ -16,10 +16,12 @@ verified_by:packages/lab/src/Schedule/Schedule.test.tsx,packages/lab/src/Schedule/TimeGridView.test.tsx,packages/lab/src/Schedule/timeGridLayout.test.ts,+ packages/lab/src/Schedule/monthLayout.test.ts,packages/lab/src/Schedule/__tests__/ScheduleTimeGridGeometry.a11y.chromium.spec.ts,packages/lab/src/Schedule/__tests__/ScheduleTimeGridOverlap.a11y.chromium.spec.ts,packages/lab/src/Schedule/__tests__/ScheduleTimeGridInitialPosition.a11y.chromium.spec.ts,packages/lab/src/Schedule/__tests__/ScheduleEventPopover.a11y.chromium.spec.ts,+ packages/lab/src/Schedule/__tests__/ScheduleMonthOverflow.a11y.chromium.spec.ts,apps/storybook/stories/Schedule.stories.tsx,scripts/check-knowledge.mjs,]@@ -42,15 +44,15 @@ system_specs: [spec:AST-002/DEC-1, spec:AST-025/DEC-1, spec:AST-027/DEC-1]## Contract at a glance-| Area | Contract |-| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| Public contract | One additive option on the time-grid view factories: `renderPopover?: (event: CalendarEvent) => ReactNode` on `createScheduleWeeklyView` and `createScheduleDayView`. `Schedule` props, `ScheduleContextValue`, and the month and list views gain nothing. |-| Behavior | In the week and day views one viewport owns both scroll axes; the day header, all-day row, and hour gutter are sticky items of the same grid as the day columns (FR1–FR3). A range that contains today opens once, one hour before now, and never moves the person's own scroll afterwards (FR4–FR6). Simultaneous events share the column side by side in a deterministic, isolated layout; nothing is covered or dropped (FR7–FR10). With `renderPopover`, each painted event with content is a native button the view renders, and the view opens one popover it owns with that content; without it, the views stay read-only (FR11–FR14). |-| End-user impact | Pointer users open an event's details from the event itself; keyboard users reach and scroll the grid, open an event with Enter or Space, read its details in a dialog, and return to the event on Escape; screen-reader users get named event buttons in day groups that announce their popup, expanded state, and controlled dialog; people with classic scrollbars or narrow windows see one aligned header, gutter, and body; a week opened in the afternoon shows the afternoon. |-| Builder impact | Optional: build the week or day view with `renderPopover` and return the details content for an event. No migration; read-only callers change nothing. |-| Compatibility/readiness | Additive within the experimental `@astryxdesign/lab` surface. Read-only markup is preserved apart from the keyboard-reachable viewport that `spec:AST-025` already requires. |-| Review checks | Reject an activation prop or callback on `Schedule` or in the context value, trigger props or open state exposed to the caller, a Popover prop passed through the view option (padding, placement, width, controlled state, dismissal), a close or controls argument to `renderPopover`, a popover instance per event, a button that opens nothing, a render prop that replaces the event's painted content, a rank/priority/`isShared` field, an `initialScroll` prop, a second scroll container inside the time grid, JavaScript scrollbar-width constants, inter-block `z-index` or any page-level stacking band, focusable nodes inside the hidden read-only grid, and a scroll that re-runs on data refresh or theme change. |-| Governing rules | `spec:AST-002` FR1–FR4, FR10 (admission and independently correct states); `spec:AST-025` FR2, FR12, FR14, FR15, FR18 (one explicit owner, keyboard access, chaining, native scrollbars, deterministic nesting); `spec:AST-027` FR1–FR6 (local stacking inside an isolation owner); `component:Popover` (the dialog surface, its padding, dismissal, and focus behaviour). |+| Area | Contract |+| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Public contract | One additive option on the time-grid view factories: `renderPopover?: (event: CalendarEvent) => ReactNode` on `createScheduleWeeklyView` and `createScheduleDayView`. `Schedule` props, `ScheduleContextValue`, and the month and list view options gain nothing; the month view's overflow control and day popover are view-owned and take no option. |+| Behavior | In the week and day views one viewport owns both scroll axes; the day header, all-day row, and hour gutter are sticky items of the same grid as the day columns (FR1–FR3). A range that contains today opens once, one hour before now, and never moves the person's own scroll afterwards (FR4–FR6). Simultaneous events share the column side by side in a deterministic, isolated layout; nothing is covered or dropped (FR7–FR10). With `renderPopover`, each painted event with content is a native button the view renders, and the view opens one popover it owns with that content; without it, the views stay read-only (FR11–FR14). In the month view a week row paints at most three levels of chips; a busy day trades its third level for a "+N more" button that opens the view's one popover listing the whole day, so no event is dropped or painted outside its row (FR15–FR17). |+| End-user impact | Pointer users open an event's details from the event itself; keyboard users reach and scroll the grid, open an event with Enter or Space, read its details in a dialog, and return to the event on Escape; screen-reader users get named event buttons in day groups that announce their popup, expanded state, and controlled dialog; people with classic scrollbars or narrow windows see one aligned header, gutter, and body; a week opened in the afternoon shows the afternoon; a busy month day shows how many events it hides and lists them all on press. |+| Builder impact | Optional: build the week or day view with `renderPopover` and return the details content for an event. No migration; read-only callers change nothing. |+| Compatibility/readiness | Additive within the experimental `@astryxdesign/lab` surface. Read-only markup is preserved apart from the keyboard-reachable viewport that `spec:AST-025` already requires, the month view's table structure, and its "+N more" button on a busy day. |+| Review checks | Reject an activation prop or callback on `Schedule` or in the context value, trigger props or open state exposed to the caller, a Popover prop passed through the view option (padding, placement, width, controlled state, dismissal), a close or controls argument to `renderPopover`, a popover instance per event, a button that opens nothing, a render prop that replaces the event's painted content, a rank/priority/`isShared` field, an `initialScroll` prop, a second scroll container inside the time grid, JavaScript scrollbar-width constants, inter-block `z-index` or any page-level stacking band, focusable nodes inside the hidden read-only grid, a scroll that re-runs on data refresh or theme change, a month chip painted outside its week row, a month event neither painted nor counted, a month week row that grows, a "+N more" that is not a native button or opens nothing, a second month popover, a month `grid` role, `aria-readonly`, or arrow-key promise, and a caller option for month overflow. |+| Governing rules | `spec:AST-002` FR1–FR4, FR10 (admission and independently correct states); `spec:AST-025` FR2, FR12, FR14, FR15, FR18 (one explicit owner, keyboard access, chaining, native scrollbars, deterministic nesting); `spec:AST-027` FR1–FR6 (local stacking inside an isolation owner); `component:Popover` (the dialog surface, its padding, dismissal, and focus behaviour). |This table is a review projection; the body below is authoritative.@@ -65,8 +67,9 @@ its duration, its horizontal share of a day column is how many things happenat once, and the viewport's scroll position is which part of the day a personis looking at. This record settles those three geometric contracts and theone interaction the time-grid views offer on events: a popover the view owns,-with content the caller supplies. Interaction is a property of a view, not of-Schedule.+with content the caller supplies. The month view gives every week row one+height; the record settles how a busy day fits into it without losing an+event. Interaction is a property of a view, not of Schedule.## Compatibility and migration@@ -77,10 +80,12 @@ Schedule.in three ways that no caller can observe through API: initial scrollposition when the range contains today, side-by-side placement ofsimultaneous events, and one scroll owner with sticky header, all-day row,- and gutter.+ and gutter. The month view's default changes in two ways: its accessible+ structure is a table rather than a read-only grid, and a day with more+ events than three levels shows two chips and a "+N more" button.- Controlled/uncontrolled behavior: unchanged. `date` stays fully controlledthrough `onChangeDate`; Schedule holds no selection state.-- Migration decision: none required (DEC-1 through DEC-5 are additive or+- Migration decision: none required (DEC-1 through DEC-6 are additive orinternal).Consumer migration instructions belong in consumer docs and release notes.@@ -106,6 +111,11 @@ Consumer migration instructions belong in consumer docs and release notes.dialog name, its standard surface and padding, and when it closes.- The hidden read-only grid that announces the time grid's structure toassistive technology when the view has no `renderPopover`.+- The month view's table structure and event layout: its headers and cell+ names, chip levels in each week row, the cap of three levels, the "+N more"+ count on a busy day, and the one popover that lists that day's events — its+ instance, which day is open, its anchor, its dialog name, its standard+ surface and padding, and when it closes.**Does not own / non-goals**@@ -113,14 +123,16 @@ Consumer migration instructions belong in consumer docs and release notes.errors, and any actions or links inside them — owned by the product callsitethrough `renderPopover`. The callsite never receives trigger props, openstate, or the popover instance.-- Any interaction other than the event popover — navigation, menus, editing,- selection, drag — not Schedule concepts in this record.-- Interaction in the month and list views, and in custom views — each view- owns its own interaction contract; Schedule and its context carry no+- Any interaction other than the time-grid event popover and the month+ view's day popover — navigation, menus, editing, selection, drag — not+ Schedule concepts in this record.+- Event interaction in the month and list views, and in custom views — each+ view owns its own interaction contract; Schedule and its context carry noactivation callback for any view.- Dialog semantics, dismissal, focus movement, and surface padding of the- popover itself — owned by `component:Popover`; the time grid composes that- component with its defaults and exposes none of its props.+ popovers themselves — owned by `component:Popover`; the time grid and the+ month view compose that component with its defaults and expose none of its+ props.- Event creation, moving, resizing, or drag — not Schedule concepts.- A ranking or priority between simultaneous events; no event is preferredover another in layout.@@ -135,16 +147,18 @@ Consumer migration instructions belong in consumer docs and release notes.Consumer prop syntax and examples remain in `Schedule.doc.mjs`.-| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |-| ---------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -------------------- | ---------------- | ------------------------------------------------------------------- |-| view | month, week, day, list, or a caller-built view object | which layout renders the range and how the range expands around `date` | always | required | `component:Schedule` | experimental Lab | type-level only |-| event source | static array, async loader | where events for the rendered range come from; a loader suspends until it resolves | always | required | `component:Schedule` | experimental Lab | type-level only |-| categories | label and one of ten colors | how an event's `category` string resolves to a color and an announced name | always | `[]`; unmatched names render blue | `component:Schedule` | experimental Lab | an unknown color is a type error |-| focus date | any instant | the day treated as today for highlighting; it does not drive the initial scroll, which follows the clock | month, week, day | now at mount | `component:Schedule` | experimental Lab | n/a |-| hour window | `minHour` 0–23, `maxHour` 1–24, `hourHeight` pixels | which hours the time grid draws and how tall one hour is | week, day | 0, 24, 100 | `component:Schedule` | experimental Lab | out-of-range hours are clamped; `maxHour` is forced above `minHour` |-| event popover | view option present with content, present with `null` for an event, absent | whether the week and day views open a view-owned popover from an event, with the content the caller returns for that event, or paint the event read-only | week and day event blocks, timed and all-day; the month and list views have no interaction option in this record | absent | `component:Schedule` | experimental Lab | `null` or `undefined` content leaves that event read-only |-| initial position | today in range, today not in range | where the time-grid viewport opens for a rendered range | week, day | one hour before now, or the window start | `component:Schedule` | experimental Lab | derived; not caller-settable |-| overlap column | one column per concurrently painted event inside an overlap cluster | how simultaneous events share a day column | week, day timed events | equal columns, expanded into free neighbours | `component:Schedule` | experimental Lab | derived; not caller-settable |+| Concept | Closed values or states | Meaning | Availability by variant/orientation/state | Default | Owner | Stability | Invalid-value behavior |+| ---------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -------------------- | ---------------- | ------------------------------------------------------------------- |+| view | month, week, day, list, or a caller-built view object | which layout renders the range and how the range expands around `date` | always | required | `component:Schedule` | experimental Lab | type-level only |+| event source | static array, async loader | where events for the rendered range come from; a loader suspends until it resolves | always | required | `component:Schedule` | experimental Lab | type-level only |+| categories | label and one of ten colors | how an event's `category` string resolves to a color and an announced name | always | `[]`; unmatched names render blue | `component:Schedule` | experimental Lab | an unknown color is a type error |+| focus date | any instant | the day treated as today for highlighting; it does not drive the initial scroll, which follows the clock | month, week, day | now at mount | `component:Schedule` | experimental Lab | n/a |+| hour window | `minHour` 0–23, `maxHour` 1–24, `hourHeight` pixels | which hours the time grid draws and how tall one hour is | week, day | 0, 24, 100 | `component:Schedule` | experimental Lab | out-of-range hours are clamped; `maxHour` is forced above `minHour` |+| event popover | view option present with content, present with `null` for an event, absent | whether the week and day views open a view-owned popover from an event, with the content the caller returns for that event, or paint the event read-only | week and day event blocks, timed and all-day; the month and list views have no interaction option in this record | absent | `component:Schedule` | experimental Lab | `null` or `undefined` content leaves that event read-only |+| initial position | today in range, today not in range | where the time-grid viewport opens for a rendered range | week, day | one hour before now, or the window start | `component:Schedule` | experimental Lab | derived; not caller-settable |+| overlap column | one column per concurrently painted event inside an overlap cluster | how simultaneous events share a day column | week, day timed events | equal columns, expanded into free neighbours | `component:Schedule` | experimental Lab | derived; not caller-settable |+| month levels | up to three levels of chips per week row; a day that needs more shows two chips and "+N more" | how many chips a month week row paints and what stands in for the rest | month | three levels | `component:Schedule` | experimental Lab | derived; not caller-settable |+| day popover | closed, open for one day | the view-owned popover that lists every event of one busy month day | month days with "+N more" | closed | `component:Schedule` | experimental Lab | derived; not caller-settable |## Behavioral and layout contract@@ -167,6 +181,9 @@ intentional decision.| FR12 | The time grid owns exactly one popover instance, rendered through `component:Popover` with that component's defaults — dialog role, modal, auto-focus, hidden fallback close, Escape dismiss, light dismiss, standard surface and padding — and named by the open event's `title`. At most one event is open at a time; opening another event closes the first and opens the second in the same gesture. The popover closes when it is dismissed, when its event is no longer painted (removed from the source, paged out of range, or the view is swapped), and its `aria-expanded` reflects the open event and no other. The content is `renderPopover(event)` for the open event only; it re-renders with the event object for the same `id` while that event stays in range. | DEC-1; DEC-5; `component:Popover` | settled || FR13 | Without `renderPopover`, event blocks remain non-interactive, painted decoration, and the hidden read-only grid remains the only accessible representation of events in the time grid. The only focusable element inside the time grid is the scroll viewport, and only while it overflows (AR1). | DEC-1; `spec:AST-002` FR10 | settled || FR14 | `renderPopover` is an option of the week and day view factories, which share the time-grid event anatomy, and of no other view. The month and list views render events read-only and expose no interaction option in this record; a future interaction contract for either is its own record change and may differ. `Schedule` and `ScheduleContextValue` carry no activation callback. The option exposes no trigger props, open state, popover instance, or Popover presentation props, and takes no close or controls argument; the time grid presents the popover as a popover at every pointer type and width. | DEC-1; DEC-5 | settled |+| FR15 | The month view paints each event as one chip per week it covers, spanning its days in that week. Chips in a week row take levels: events are ordered by first day ascending, then all-day and multi-day events before single-day timed events, then longer events first, then title, then `id`; in each week it covers, an event takes the lowest level that is free on every day it covers there. The result MUST be identical for any input order of the same events. A week row paints at most three levels, keeps its height, and MUST NOT paint a chip outside its row. The month surface is an `isolation: isolate` owner; chips and a focused "+N more" rise with a local positive `z-index` inside it only. | DEC-6; `spec:AST-027` FR1–FR6 | settled |+| FR16 | Every event of a day MUST be either painted as a chip on that day or counted by that day's "+N more"; no event is dropped. When any event covering a day sits at level four or higher, that day's third level holds "+N more" instead of a chip, and N is the number of that day's events at level three or higher. A chip whose span crosses such a day is painted on its other days and counted on that one. | DEC-6 | settled |+| FR17 | "+N more" is a native `<button type="button">` inside its day's cell. Click, tap, Enter, and Space toggle the month view's one popover for that day, rendered through `component:Popover` with that component's defaults and named by the day's full date. The popover lists every event of that day in start order, each with its time range or "All day" and its title, marked with its category colour and muted once past; those events are read-only. At most one day is open at a time; activating another day's "+N more" closes the first and opens the second in the same gesture. The popover closes when it is dismissed and when its "+N more" is no longer rendered — the day no longer needs more than three levels, the range is paged, or the view is swapped — and `aria-expanded` reflects the open day and no other. | DEC-6; `component:Popover` | settled |### Allowed variation@@ -189,27 +206,31 @@ intentional decision.### Representative states-| State | Required invariant | Allowed variation |-| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |-| Week, today in range, afternoon | opens with the hour before now at the top of the column area; now-line visible | hour window, hour height, container height |-| Week, today in range, near midnight | opens at the maximum offset; now-line visible | same |-| Week, today not in range | opens at offset 0 | same |-| Loader resolves after the person scrolled | offset unchanged | loader latency |-| Clock tick, resize, theme change, data refresh | offset unchanged | any |-| Two identical events (same title and minutes) | two equal half-width blocks; order by `id` | column width |-| Three and five simultaneous events | three thirds, five fifths; every block ≥ 1 pixel visible and uncovered; time line hidden where it no longer fits | column width |-| Chain A–B–C where A and C do not meet | A and C share a column, B beside them | which of A/C expands |-| Long event containing a short one | both visible side by side for the overlap; the long one keeps its full height | widths |-| Classic 15px scrollbar, 1280px wide | header/body edges within 1px for every column | scrollbar width |-| 760px wide, scrolled 160px on the inline axis | header moves with the columns; gutter and corner stay; one inline scroller; page does not widen | scroll amount |-| Right-to-left direction | FR3 holds with columns and pins mirrored | locale |-| `renderPopover`, keyboard | Tab reaches the viewport, then each event button in DOM order; Enter or Space opens the popover, focus moves into it, the button reads `aria-expanded="true"`; Escape closes it, focus returns to the same button, `aria-expanded="false"`; ring visible | ring tokens |-| `renderPopover` absent | no button; hidden read-only grid announces events; viewport is the single tab stop while it overflows | none |-| `renderPopover`, screen reader | day groups of named buttons and the all-day group; each button announces `aria-haspopup="dialog"` and its expanded state and controls the open dialog, which is named by the event title; no hidden read-only grid, so nothing is announced twice | none |-| `renderPopover`, one event open, another activated | the first closes and its button reads `aria-expanded="false"`; the second opens and its button reads `aria-expanded="true"`; one dialog exists | none |-| `renderPopover`, one event open, that event removed or paged out | the popover closes; the block and its button unmount; no orphan dialog remains and nothing else in the grid moves | none |-| `renderPopover` returns `null` for an event | that block is painted as read-only and exposed as static text inside its day group; no button, no popup attributes | none |-| `renderPopover`, light dismiss | clicking the grid outside the dialog closes it; the button reads `aria-expanded="false"` and keeps focus if it had it | none |+| State | Required invariant | Allowed variation |+| --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |+| Week, today in range, afternoon | opens with the hour before now at the top of the column area; now-line visible | hour window, hour height, container height |+| Week, today in range, near midnight | opens at the maximum offset; now-line visible | same |+| Week, today not in range | opens at offset 0 | same |+| Loader resolves after the person scrolled | offset unchanged | loader latency |+| Clock tick, resize, theme change, data refresh | offset unchanged | any |+| Two identical events (same title and minutes) | two equal half-width blocks; order by `id` | column width |+| Three and five simultaneous events | three thirds, five fifths; every block ≥ 1 pixel visible and uncovered; time line hidden where it no longer fits | column width |+| Chain A–B–C where A and C do not meet | A and C share a column, B beside them | which of A/C expands |+| Long event containing a short one | both visible side by side for the overlap; the long one keeps its full height | widths |+| Classic 15px scrollbar, 1280px wide | header/body edges within 1px for every column | scrollbar width |+| 760px wide, scrolled 160px on the inline axis | header moves with the columns; gutter and corner stay; one inline scroller; page does not widen | scroll amount |+| Right-to-left direction | FR3 holds with columns and pins mirrored | locale |+| `renderPopover`, keyboard | Tab reaches the viewport, then each event button in DOM order; Enter or Space opens the popover, focus moves into it, the button reads `aria-expanded="true"`; Escape closes it, focus returns to the same button, `aria-expanded="false"`; ring visible | ring tokens |+| `renderPopover` absent | no button; hidden read-only grid announces events; viewport is the single tab stop while it overflows | none |+| `renderPopover`, screen reader | day groups of named buttons and the all-day group; each button announces `aria-haspopup="dialog"` and its expanded state and controls the open dialog, which is named by the event title; no hidden read-only grid, so nothing is announced twice | none |+| `renderPopover`, one event open, another activated | the first closes and its button reads `aria-expanded="false"`; the second opens and its button reads `aria-expanded="true"`; one dialog exists | none |+| `renderPopover`, one event open, that event removed or paged out | the popover closes; the block and its button unmount; no orphan dialog remains and nothing else in the grid moves | none |+| `renderPopover` returns `null` for an event | that block is painted as read-only and exposed as static text inside its day group; no button, no popup attributes | none |+| `renderPopover`, light dismiss | clicking the grid outside the dialog closes it; the button reads `aria-expanded="false"` and keeps focus if it had it | none |+| Month, a day with three events | three chips; no "+N more" | none |+| Month, a day with five events, one of them a three-day event on level three | two chips and "+3 more" on that day; the three-day chip paints on its other days | which events take levels one and two |+| Month, "+N more" activated by keyboard | a dialog named by the full date lists all five events; Escape closes it and focus returns to the "+N more" button | none |+| Month, a day open, a refresh leaves that day three events | the popover closes, focus moves to that day's cell, and no dialog remains | none |### Transformation and precedence order@@ -224,6 +245,12 @@ intentional decision.- **ORD3 — Pinning.** Sticky header cells paint above the columns, the gutterabove the columns, and the corner above both, all as local order inside theisolated viewport.+- **ORD4 — Month layout.** Order events (first day, all-day and multi-day+ first, longer first, title, `id`) → in that order, give each event in each+ week it covers the lowest level free on all its days there → for each day+ with an event on level four or higher, give its third level to "+N more" and+ count that day's events on level three or higher → paint the remaining+ chips, cutting a span around the days where it is counted.### Performance and resources@@ -236,6 +263,9 @@ intentional decision.render.- **PR3 — Shared observers.** Keyboard ownership and overflow state come fromthe shared scroll hook; Schedule adds no observers of its own.+- **PR4 — Pure month layout.** Level assignment and the "+N more" counts are a+ pure function of the range's events and days, with no DOM reads, and run+ during render.## Accessibility contract@@ -276,6 +306,23 @@ intentional decision.logical properties and mirror under right-to-left direction. Initialpositioning is instant, so reduced-motion preferences have nothing tosuppress.+- **AR7 — Month table and "+N more".** The month view is a table, not an+ interactive grid: it is named by the month title, the weekdays are its+ column headers, each week row has a row header naming its dates, and each+ cell is named by its full date. A corner column header heads the+ row-header column, so every row has the same columns and each day cell's+ column header is its weekday. The table makes no arrow-key navigation+ promise; a day's "+N more" is an ordinary Tab stop in reading order. The+ button's accessible name is the count and the full date ("2 more events,+ Tuesday, October 6, 2026"; one hidden event reads "1 more event, …"). It+ carries `aria-haspopup="dialog"`, `aria-expanded` that is true only while+ its day is open, and `aria-controls` naming the view's popover, and it shows+ the shared focus ring in full. The popover is a modal dialog named by the+ full date; focus moves into it on open and returns to the button on close.+ When the button is no longer rendered, focus moves to the day's cell, which+ takes programmatic focus without entering the Tab order and shows the+ shared focus ring. The cell's hidden event list keeps naming every event of+ the day, so a screen-reader user hears the whole day without opening it.## Design relationships@@ -287,6 +334,9 @@ intentional decision.| Event block | Shows title and time in the category color; shares the column with concurrent events; with `renderPopover` it is the button that opens the event popover. | prescribed | prominent | FR7–FR12, AR2–AR3 || Event popover | Shows the caller's content for one event on Popover's standard surface and padding, anchored to the event's button. | prescribed | prominent | FR11–FR12, AR3 || Now-line | Marks the current minute on today's column, above blocks, inside the column. | prescribed | supporting | FR4, FR9 |+| Month chip | Spans its days within a week on its level, in the category colour. | prescribed | prominent | FR15, FR16 |+| "+N more" | Stands in for a busy day's third chip, counts that day's unpainted events, and opens the day popover. | prescribed | supporting | FR16, FR17, AR7 |+| Day popover | Lists every event of one day on Popover's standard surface and padding, anchored to the day's "+N more". | prescribed | supporting | FR17, AR7 |The component implements design requirements without copying their rationale.An `unsettled` representation remains a human decision; principles do not let an@@ -296,12 +346,13 @@ agent invent the answer.<!-- design-decisions:v1 -->-| ID | Decision | Intent or reason | Applies to | Allowed variation |-| --- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------- | ----------------------------- |-| DD1 | One `hourHeight` of lead above now | The person sees what just happened and most of what is next without the now-line sitting on the top edge. | week, day | scales with `hourHeight` |-| DD2 | Equal cluster columns with rightward expansion | Concurrent events read as concurrent; width is the only axis that changes and every event stays fully perceivable. | week, day | expansion into free columns |-| DD3 | Time line collapses before the title does | The title identifies the event; the time is already implied by the block's vertical position. | narrow blocks | the container-query threshold |-| DD4 | The popover keeps Popover's standard padding | Event details read as one of the system's popovers; content is semantic and never wraps itself to supply padding. | event popover | none in this record |+| ID | Decision | Intent or reason | Applies to | Allowed variation |+| --- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------- | ----------------------------- |+| DD1 | One `hourHeight` of lead above now | The person sees what just happened and most of what is next without the now-line sitting on the top edge. | week, day | scales with `hourHeight` |+| DD2 | Equal cluster columns with rightward expansion | Concurrent events read as concurrent; width is the only axis that changes and every event stays fully perceivable. | week, day | expansion into free columns |+| DD3 | Time line collapses before the title does | The title identifies the event; the time is already implied by the block's vertical position. | narrow blocks | the container-query threshold |+| DD4 | The popover keeps Popover's standard padding | Event details read as one of the system's popovers; content is semantic and never wraps itself to supply padding. | event popover | none in this record |+| DD6 | A busy day trades its third chip for a count | Weeks keep one height so the month still reads as a grid; the count says how much is hidden and opens the whole day. | month view | none |## Family and system relationships@@ -309,15 +360,16 @@ agent invent the answer.content the view cannot derive (what an event's details say); its absenceis a complete read-only state (FR13), so both states are independentlycorrect. No trigger props, state, or presentation vocabulary is introduced.-- `component:Popover` owns the dialog surface the time grid opens: role,- name, modality, auto-focus, fallback close, Escape and light dismiss, focus- return, surface, and padding. The time grid composes it with its defaults- and exposes none of its props.+- `component:Popover` owns the dialog surface the time grid and the month+ view open: role, name, modality, auto-focus, fallback close, Escape and+ light dismiss, focus return, surface, and padding. Both views compose it+ with its defaults and expose none of its props.- `spec:AST-025` owns scroll-container behaviour. The time-grid viewportintegrates the shared hook on existing structure rather than wrapping it;keyboard access, chaining, and native scrollbars follow that record.-- `spec:AST-027` owns local stacking. FR9 places every Schedule `z-index`- inside an isolation owner and routes nothing through page-level bands.+- `spec:AST-027` owns local stacking. FR9 and FR15 place every Schedule+ `z-index` inside an isolation owner and route nothing through page-level+ bands.- `architecture:public-component-api` owns stable admission and compatibility;Schedule remains experimental in Lab.- `architecture:react-component-runtime` owns effect and resource lifetime;@@ -327,14 +379,18 @@ agent invent the answer.## Verification map-| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |-| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |-| FR1–FR3 | `ScheduleTimeGridGeometry.a11y.chromium.spec.ts` (classic scrollbars, 760px inline scroll, RTL, keyboard reach, focus ring) | fixed-height week with 15px scrollbar; narrow week scrolled 160px; RTL | A second scroller, a header outside the viewport, or a non-sticky gutter drifts header or labels past 1px. | `audit:Schedule/layout` |-| FR4–FR6 | `TimeGridView.test.tsx` positioning suite with mocked geometry; `ScheduleTimeGridInitialPosition.a11y.chromium.spec.ts` with an installed clock | 15:00 week, 13:00 day, 23:50 day (clamp), range without today, tick/theme/resize after a manual scroll | Opening at 0 with today in range, re-running on a tick, or losing the offset across the suspense swap fails. | `audit:Schedule/behavior` |-| FR7–FR10 | `timeGridLayout.test.ts` pure-function suite; `ScheduleTimeGridOverlap.a11y.chromium.spec.ts` | tie, three, five, chain, containment, reversed input order, fifteen-minute block | Any inter-block overlap above 1px, a dropped event, an input-order-dependent result, or a missing `isolation: isolate` fails. | `audit:Schedule/layout` |-| FR11–FR14 | `Schedule.test.tsx` popover suite; `ScheduleEventPopover.a11y.chromium.spec.ts` against the `EventPopover` story | option absent, present, `null` for one event; open, Escape, light dismiss, switch, removal, paging; month and list unchanged | A button without the option, a button for a `null` event, two open popovers, a stale `aria-expanded`, an orphan dialog after removal, focus not returning, or focus inside the hidden grid fails. | `audit:Schedule/public-api` |-| AR1, AR4–AR5 | `ScheduleTimeGridGeometry` keyboard-reach case; `Schedule.test.tsx` hidden-grid suite; scoped axe audit of the read-only and popover stories | overflowing and fitting viewports; read-only week | An unreachable viewport, a focusable node inside `aria-hidden`, or a changed read-only grid fails. | `audit:Schedule/accessibility` |-| AR2–AR3, AR6 | `Schedule.test.tsx` name and popup-attribute assertions; `ScheduleEventPopover` focus-ring pixels, focus-return, and RTL cases | `EventPopover` story focused by keyboard, open and closed, LTR and RTL | A name missing the date or category, a clipped ring, a missing `aria-haspopup`, a dialog without the event title as its name, or an unmirrored pin fails. | `audit:Schedule/accessibility` |+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |+| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |+| FR1–FR3 | `ScheduleTimeGridGeometry.a11y.chromium.spec.ts` (classic scrollbars, 760px inline scroll, RTL, keyboard reach, focus ring) | fixed-height week with 15px scrollbar; narrow week scrolled 160px; RTL | A second scroller, a header outside the viewport, or a non-sticky gutter drifts header or labels past 1px. | `audit:Schedule/layout` |+| FR4–FR6 | `TimeGridView.test.tsx` positioning suite with mocked geometry; `ScheduleTimeGridInitialPosition.a11y.chromium.spec.ts` with an installed clock | 15:00 week, 13:00 day, 23:50 day (clamp), range without today, tick/theme/resize after a manual scroll | Opening at 0 with today in range, re-running on a tick, or losing the offset across the suspense swap fails. | `audit:Schedule/behavior` |+| FR7–FR10 | `timeGridLayout.test.ts` pure-function suite; `ScheduleTimeGridOverlap.a11y.chromium.spec.ts` | tie, three, five, chain, containment, reversed input order, fifteen-minute block | Any inter-block overlap above 1px, a dropped event, an input-order-dependent result, or a missing `isolation: isolate` fails. | `audit:Schedule/layout` |+| FR11–FR14 | `Schedule.test.tsx` popover suite; `ScheduleEventPopover.a11y.chromium.spec.ts` against the `EventPopover` story | option absent, present, `null` for one event; open, Escape, light dismiss, switch, removal, paging; month and list unchanged | A button without the option, a button for a `null` event, two open popovers, a stale `aria-expanded`, an orphan dialog after removal, focus not returning, or focus inside the hidden grid fails. | `audit:Schedule/public-api` |+| AR1, AR4–AR5 | `ScheduleTimeGridGeometry` keyboard-reach case; `Schedule.test.tsx` hidden-grid suite; scoped axe audit of the read-only and popover stories | overflowing and fitting viewports; read-only week | An unreachable viewport, a focusable node inside `aria-hidden`, or a changed read-only grid fails. | `audit:Schedule/accessibility` |+| AR2–AR3, AR6 | `Schedule.test.tsx` name and popup-attribute assertions; `ScheduleEventPopover` focus-ring pixels, focus-return, and RTL cases | `EventPopover` story focused by keyboard, open and closed, LTR and RTL | A name missing the date or category, a clipped ring, a missing `aria-haspopup`, a dialog without the event title as its name, or an unmirrored pin fails. | `audit:Schedule/accessibility` |+| FR15–FR16 | `monthLayout.test.ts` pure-function suite; `ScheduleMonthOverflow.a11y.chromium.spec.ts` | three events; five events with a three-day span on level three; reversed input order; an empty week | A chip painted below its week row, an event neither painted nor counted, an input-order-dependent result, a row that grows, or a missing `isolation: isolate` fails. | `audit:Schedule/layout` |+| FR17, AR7 | `Schedule.test.tsx` month suite; `ScheduleMonthOverflow.a11y.chromium.spec.ts` | open by click and by keyboard, Escape, light dismiss, switch days, page away; LTR and RTL; light and dark | A control that is not a button, a name without the count or the date, two dialogs, a stale `aria-expanded`, focus not returning, a clipped focus ring, or a dialog left open after paging fails. | `audit:Schedule/accessibility` |+| AR7 structure | `Schedule.test.tsx` month table suite; `ScheduleMonthOverflow.a11y.chromium.spec.ts` accessibility-tree and Tab-order readings | quiet and busy months; Tab from the pager through the scroll container to each "+N more" in reading order; screen-reader names of headers, cells, and buttons; the Sunday cell's column header read as Sunday | A `grid` role or `aria-readonly`, a missing column, row, or corner header, a cell whose column header is not its weekday, a cell named without its full date, or a "+N more" outside the Tab order fails. | `audit:Schedule/accessibility` |+| FR17 close rule | `Schedule.test.tsx` month suite; `ScheduleMonthOverflow.a11y.chromium.spec.ts` refresh case | a day opened by keyboard, then a refresh leaves it three events; a day open, then the range paged | A dialog left open, a stale `aria-expanded`, focus left on the page body while the day's cell is still rendered, a cell in the Tab order, or a focused cell without the shared focus ring fails. | `audit:Schedule/behavior` |## Decision log@@ -425,6 +481,25 @@ presentation decision on this record.Rejected: a configuration object beside the content function — no secondinseparable option exists.+### DEC-6 — A busy month day shows a count that opens the whole day++**Reference:** `component:Schedule/DEC-6`+**Decider:** cixzhang, 2026-10-06++Every month week row keeps one height and paints at most three levels of+chips. When a day needs more, its third level becomes a "+N more" button that+counts the events not painted there and opens the view's one popover, which+lists every event of that day. No event is dropped and nothing paints outside+its row; the hidden per-cell list keeps the whole day for assistive+technology. The layout is derived from the data, so no prop selects it.++Rejected: rows that grow to fit — weeks of different heights stop reading as+one grid and push later weeks out of view.+Rejected: a count that opens nothing — the hidden events stay out of reach for+sighted people.+Rejected: a "+N more" that switches to the day view — it needs an activation+callback on Schedule, which DEC-1 keeps out.+## Open questionsNone.