feat(web): draft a custom preset in a creator-mode session

The settings section gains the conversational authoring entry beside
copying: a dashed add-card (the Models page's affordance) that stages the
self-referential cordis preset and starts a new session on it, closing the
settings panel through the shell's new section owner-prop `close` — the
one shell affordance a section receives, for flows that leave settings.

The seat learns the difference between picking and staging: `select()`'s
immediate apply meets the still-current running session and drops the
stage as unservable, so the entry uses `stage()` and leaves the apply to
the list-change applier that fires when the started session becomes
current. `load()` stops regressing the display when its reply lands after
an applied stage was consumed — staged pick first, then the composition
the current session already carries, then the deployment default.

The authoring lane connects a workspace and drives the gesture to a
composed host session; the section goldens gain the entry.
This commit is contained in:
Yichen Jiang
2026-08-09 00:19:18 +08:00
parent 564337997a
commit 43e93c6a67
16 changed files with 288 additions and 23 deletions

View File

@@ -46,7 +46,7 @@ describe('GeneralSection', () => {
const renderSlot = vi.fn(
((key: string) => <div data-testid={`slot-${key}`} />) as GeneralSectionComponentProps['renderSlot'],
)
const props: GeneralSectionComponentProps = { ...kit, renderSlot }
const props: GeneralSectionComponentProps = { ...kit, renderSlot, close: vi.fn() }
const view = render(<GeneralSection {...props} />)
return { view, renderSlot }
}