CreatorTrack /app app segments¶
LIVE on prod 2026-07-06 (merge d710dda-era; migration applied to prod DB). Typing /app in any page body opens a three-step picker (installed app, tab, segment) and inserts an app_segment block that mounts a live piece of that app inline. Post-merge fix: toast API standardized the same day (no position, no pos tone); segments adapted.
Architecture¶
- Block type
app_segment, props{ appId, appTab, segment }. DB migration widensblocks_type_check(db/migrations/20260707T000352). Wire type passes throughlib/block-types.tsunchanged. - Registry metadata:
components/workspace/blocks/appSegmentDefs.ts(pure module, server-safe). Client component map:components/workspace/blocks/AppSegmentBlock.tsx(next/dynamic, ssr:false). Adding a segment = one defs entry + one dynamic entry + the segment component. - Picker:
components/workspace/blocks/AppSegmentPicker.tsx, anchored-floating (PagePicker pattern), keyboard nav, Backspace/ArrowLeft walks back a step. Filters to apps installed in the workspace (useInstalledApps) AND present in the registry. - Slash entry:
SLASH_ONLY_DEFStypeapp_insert, aliasapp(exact-match rank). SLASH_MENU_DEFS picks Basic slash-only entries BY INDEX; a new Basic entry must be added there explicitly. - Segments are self-contained: they fetch via the app's normal REST routes (
useSegmentTaskshook wraps GET /api/tasks), never reach into the app's client state. Quadrant-drop mapping mirrorsTasksClient.moveTaskToQuadrantverbatim. - Chrome css:
ws-appseg*classes at the end ofapp/(suite)/workspace.css; segments import their app's global css (e.g.tasks.css) themselves.
Shipped segments (Tasks app)¶
Add task (full Composer incl. attachments), Today list, Eisenhower Matrix (drag between quadrants, Peek on row click), Add project.
Gotchas¶
- Read-only surfaces render a labeled card via
BlockRenderer(no live mount). - Dev-slot reaper deleted the whole worktree mid-session when >4 slots ran (over-cap reap ignores idle time); the branch survived because work was committed. Commit early in parallel slots.
URL: https://mkdocs.justinsforge.com/memory/general/reference_creatortrack_app_segments/