Skip to content

feat: Navigation architecture - flat sidebar model with dynamic phase sub-items#726

Open
scazan wants to merge 2 commits intodevfrom
nav-architecture
Open

feat: Navigation architecture - flat sidebar model with dynamic phase sub-items#726
scazan wants to merge 2 commits intodevfrom
nav-architecture

Conversation

@scazan
Copy link
Collaborator

@scazan scazan commented Mar 9, 2026

Summary

  • Flatten navigationConfig.ts with discriminated union SidebarItem type, SectionId/StepId types, and phaseToSectionId helpers
  • Rewrite useProcessNavigation for flat section model with dynamic phase sub-items
  • Add useProcessPhases hook to fetch phases for navigation
  • Add usePhaseValidation hook for per-phase validation state
  • Update shared validation utilities in processBuilderValidation.ts

Pure logic layer — no visual changes. Reviewers can validate the data model independently of any UI changes.

Stack

This is PR 1 of 3 in the Process Builder sidebar refactor:

  1. → Navigation Architecture (this PR)
  2. Sidebar Components & Phase Detail Pages (sidebar-components)
  3. Summary, Footer & Integration (process-builder-integration)

Merge add-sheet before merging PR 3.

Test plan

  • Type check passes: pnpm w:app typecheck
  • useProcessNavigation returns correct flat sections including dynamic phase sub-items
  • usePhaseValidation returns correct validation state per phase

@vercel
Copy link
Contributor

vercel bot commented Mar 9, 2026

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

Project Deployment Actions Updated (UTC)
app Ready Ready Preview Mar 9, 2026 11:06am

Request Review

scazan added 2 commits March 9, 2026 12:03
… sub-items

- Flatten navigationConfig.ts with discriminated union SidebarItem type
- Add SectionId/StepId types and phaseToSectionId helpers
- Rewrite useProcessNavigation for flat section model with dynamic phases
- Add useProcessPhases hook to fetch phases for navigation
- Add usePhaseValidation hook for per-phase validation state
- Update shared validation utilities in processBuilderValidation.ts
… guard

- Move all translation keys from stepper-navigation to PR 1 so downstream
  branches typecheck cleanly without needing type assertions
- Fix ProcessBuilderSectionNav to use isDynamic narrowing instead of t()
  on dynamic phase items (which have string labelKeys, not TranslationKeys)
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