Skip to content

feat: direct nav stack creation and auto-derived navigation structure#6

Open
trmquang93 wants to merge 1 commit intomainfrom
feature/nav-structure-definition
Open

feat: direct nav stack creation and auto-derived navigation structure#6
trmquang93 wants to merge 1 commit intomainfrom
feature/nav-structure-definition

Conversation

@trmquang93
Copy link
Copy Markdown
Collaborator

Summary

  • Auto-derive navigationStructure from screenGroups via useMemo — 0 nav-stack groups → null, 1 → single-stack, 2+ → tab-bar. Eliminates manual state that could drift out of sync with the canvas.
  • Remove ScreensPanel nav config UI — the dropdown and stack checkboxes are gone; structure is always derived from canvas groups.
  • BatchSelectionBar "Stack" button — rubber-band select screens then click Stack to group them into a nav stack with the first screen auto-set as entry.
  • Right-click context menu "Create new nav stack…" — creates a nav stack containing the clicked screen, with that screen set as stackEntryScreenId.
  • Persistence cleanupsetNavigationStructure removed from useImportExport; on import the value is re-derived from the imported screenGroups.

Test plan

  • Rubber-band select 2+ screens → click "Stack" in bar → nav stack group appears on canvas; navigationStructure.type becomes single-stack
  • Add a second nav stack group (right-click → "Create new nav stack…") → type becomes tab-bar
  • Delete a nav stack group → type reverts correctly
  • Toggle a group type from AREA to STACK in ScreenGroup header → navigationStructure updates automatically
  • Export → re-import → nav structure re-derives correctly from imported screenGroups
  • Generate instructions → stacks appear in navigation.md and build-guide.md
  • ScreensPanel no longer shows navigation dropdown or stack checkboxes
  • npm test — all 229 tests pass

…tion UI

- Replace manual navigationStructure state with useMemo derived from screenGroups:
  0 nav-stack groups → null, 1 → single-stack, 2+ → tab-bar
- Remove navigation config dropdown/checkboxes from ScreensPanel
- Add "Stack" button to BatchSelectionBar to group selected screens into a nav stack
- Add "Create new nav stack..." to screen right-click context menu
- Remove setNavigationStructure from useImportExport (re-derived from imported screenGroups)
- Extend ScreenGroup, Sidebar, analyzeNavGraph, generateInstructionFiles, validateInstructions
  with nav-stack awareness and stack entry screen configuration
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flow-forge Ready Ready Preview, Comment Mar 16, 2026 3:07am

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