Skip to content

fix(intent): the slot picker is an additional page too, plus two repairs the #6624 merge left behind - #6629

Merged
delchev merged 2 commits into
masterfrom
feat/intent-slots-additional-page
Aug 9, 2026
Merged

fix(intent): the slot picker is an additional page too, plus two repairs the #6624 merge left behind#6629
delchev merged 2 commits into
masterfrom
feat/intent-slots-additional-page

Conversation

@delchev

@delchev delchev commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #6624 (merged), which made a calendar view an additional page. This closes the same hole for view: slots — and repairs two things the merge sequence left behind.

1. The slot picker is an additional page too

view: slots was left replacing the layout, on the argument that a picker is an authoring surface rather than a second way to browse. That does not survive contact with a booking document: the picker is how a booking is created, the document page is how it is worked with afterwards, and an author needs both — exactly the choice #6547 was about.

So the picker gets the calendar's treatment: EdmIntentGenerator emits slotsView instead of layoutType: MANAGE_SLOTS, uiSlotsModels keys on it, and slots.js stops emitting the shared manage form — the layout owns the editor, so slot-click on a document master now lands on the document create page prefilled with the chosen datetime. The picker owns /<Entity>, the layout browses at /<Entity>/list, and the two carry a Slots⇄List switch. MANAGE_SLOTS is gone from every consumer; like MANAGE_CALENDAR it was intent-only and never offered by the entity editor, so nothing hand-authored carries it.

Nothing about a view: replaces a layout any more.

2. A view no longer double-registers its perspective

A defect #6624 introduced, which extending the rule made obvious: navigation.js's PERSPECTIVE_COLLECTIONS listed uiCalendarModels / uiSlotsModels alongside the layout collections. Once a view entity keeps its layout it is a member of both, so its perspective was generated twice — the same rename path written twice and a duplicate application-perspectives contribution. Harmless on disk (identical content overwriting itself), but wrong. Both view collections are dropped from that list; a view entity is always in exactly one layout collection.

3. The Java generation port had drifted out of parity — with no test to notice

#6628 ported generateUtils.js to Java (ModelGenerator) roughly an hour after #6624 merged, and the port was written against the pre-#6624 logic: uiCalendarModels / uiSlotsModels / personalCalendarModels / personalListModels still keyed on MANAGE_CALENDAR / MANAGE_SLOTS, which EdmIntentGenerator no longer emits.

Nothing is broken on master today — per GENERATION_UTILS_JAVA_PLAN.md both paths are live and no consumer is switched, and the JS path is what executes. But the moment PR 2 of that plan flips consumers, calendar and slots pages would silently stop being generated: an empty partition produces no files and no error.

GenerationParityIT could not catch it, because no parity fixture declares a view — every existing fixture matches on both pipelines whatever these four partitions do. Fixed here:

  • ModelGenerator keys on calendarView / slotsView, and personalListModels no longer excludes calendar roots (matching the JS).
  • A new views.model fixture — one calendar entity, one slot-picker entity, both keeping their MANAGE layout — registered as a parity case. Verified it is a real guard: with the ModelGenerator fix reverted the case fails on the calendar/slots page files; with it, both pipelines agree.

Verification

  • EdmIntentGeneratorTest gains documentMasterWithASlotsViewKeepsTheDocumentLayoutAndAddsThePicker; unit suite green.
  • IntentEmissionCoverageIT fixture gains a slots document (Visit): the /Visit picker landing route, /Visit/list, /Visit/create resolving to the document editor, and both toggles.
  • GenerationParityIT green with the new fixture.
  • Live: generated + published on a local instance (0 problems). The picker paints the 3-day grid honouring open/close/step; a free slot opens /Visit/create?StartsAt=… on the document editor; the saved record's edit page carries Visit Items + Add, the totals footer and Print — exactly what a slots entity used to lose; /Visit/list shows the document list with a Slots toggle. No console errors.

delchev and others added 2 commits August 9, 2026 13:36
… longer double-registers its perspective

Follow-up to the calendar change, closing the same hole for `view: slots`.

`view: slots` was left replacing the layout on the argument that a picker is an
authoring surface rather than a second way to browse. That does not survive
contact with a booking document: the picker is how a booking is CREATED, the
document page is how it is worked with afterwards, and an author needs both -
exactly the choice #6547 was about. So the picker gets the calendar's treatment:
`EdmIntentGenerator` emits `slotsView` instead of `layoutType: MANAGE_SLOTS`,
`uiSlotsModels` keys on it, `slots.js` stops emitting the shared manage form (the
layout owns the editor, so slot-click on a document master now lands on the
DOCUMENT create page prefilled with the chosen datetime), the picker takes over
/<Entity> while the layout browses at /<Entity>/list, and the two carry a
Slots/List switch. `MANAGE_SLOTS` is gone from every consumer; like
MANAGE_CALENDAR it was intent-only and never offered by the entity editor.

It also fixes a defect the calendar commit introduced, which extending the rule
to slots made obvious: `navigation.js`'s PERSPECTIVE_COLLECTIONS listed
`uiCalendarModels`/`uiSlotsModels` alongside the LAYOUT collections. Now that a
view entity keeps its layout it is a member of both, so its perspective was
generated TWICE - the same rename path written twice and a duplicate
application-perspectives contribution. The two view collections are dropped from
that list; a view entity is always in exactly one layout collection.

Covered by EdmIntentGeneratorTest (a slots document master keeps MANAGE_DOCUMENT
and carries slotsView + the slot* metadata) and the emission oracle, whose fixture
gained a slots document: the /Visit picker landing route, /Visit/list, /Visit/create
resolving to the DOCUMENT editor, and both toggles.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ional-page views

#6628 ported generateUtils.js to Java about an hour after #6624 merged, against the
pre-#6624 logic: uiCalendarModels / uiSlotsModels / personalCalendarModels /
personalListModels still keyed on MANAGE_CALENDAR / MANAGE_SLOTS, which
EdmIntentGenerator no longer emits.

Nothing is broken today - both paths are live and no consumer is switched, so the
JS path executes - but the moment consumers flip, calendar and slots pages would
silently stop being generated: an empty partition writes no files and raises no
error. GenerationParityIT could not catch it either, because no parity fixture
declares a view, so all four partitions can disagree while every fixture matches.

Key the Java collections on calendarView / slotsView (and drop the calendar
exclusion from personalListModels, matching the JS), and add a views.model
fixture - one calendar entity, one slot-picker entity, both keeping their MANAGE
layout - as a parity case. Confirmed it is a real guard: with the ModelGenerator
change reverted the case fails naming the absent AppointmentSlotsPage.js and
Appointment-slots.html; with it, both pipelines agree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@delchev
delchev merged commit 01e0dcc into master Aug 9, 2026
10 checks passed
@delchev
delchev deleted the feat/intent-slots-additional-page branch August 9, 2026 12:02
@delchev
delchev restored the feat/intent-slots-additional-page branch August 9, 2026 12:23
@delchev
delchev deleted the feat/intent-slots-additional-page branch August 9, 2026 13:27
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