Skip to content

Add LLM-driven nested grouping and ordered parts rendering#264

Open
elasticsounds wants to merge 1 commit intomainfrom
elasticsounds/storyboard-reorder
Open

Add LLM-driven nested grouping and ordered parts rendering#264
elasticsounds wants to merge 1 commit intomainfrom
elasticsounds/storyboard-reorder

Conversation

@elasticsounds
Copy link
Copy Markdown
Contributor

Summary

  • Structured page sectioning: Replace flat part_ids with a parts union schema (string | PartGroup) so the LLM can output nested groups directly (e.g., option_group > option > text + image), eliminating the heuristic structureActivityParts() post-processing
  • Ordered parts as canonical representation: Use ordered_parts as the single source of truth for rendering, removing redundant flat texts, images, groups arrays from the LLM rendering context. All 16 prompt templates updated to consume ordered_parts with nested group support
  • Preserve nested group structure: Introduce NestedGroupPart in web rendering to carry group structure through to the LLM renderer instead of flattening it
  • Individual text entry IDs in sectioning: Expose per-text-entry IDs (e.g., pg014_gp009_tx001) to the sectioning LLM so it can pair specific texts with images in structured groups
  • UI improvements: Add JSON inspection tab to section data panel, replace separate Text Groups/Images panels in storyboard overview with a unified ordered Content view showing nested group structure

Test plan

  • All 929 tests pass
  • TypeScript typecheck clean
  • i18n extraction — 0 missing translations
  • Manual: run sectioning on an activity page (e.g., sorting with image+text options) and verify the JSON tab shows nested groups
  • Manual: verify storyboard overview shows parts in document order with nested group indentation

…rendering

Replace flat part_ids with structured parts schema in page sectioning, allowing
the LLM to output nested groups (option_group > option > text+image) directly.
Use ordered_parts as the single canonical representation for rendering, removing
redundant flat texts/images/groups arrays. Preserve nested group structure
through web rendering pipeline instead of flattening. Update all 16 prompt
templates to use ordered_parts with nested group support. Add JSON inspection
tab to section data panel and unified content view to storyboard overview.
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