feat: standardize shared UI primitives across frontend #88

Merged
chihlasm merged 19 commits from frontend-standardization into main 2026-02-24 12:40:44 +00:00

19 Commits

Author SHA1 Message Date
chihlasm
d7b962459a fix: move tabbed flows view to Dashboard, restore MyTreesPage
Tabs (My Flows / My Team / Public / All) belong on the Dashboard page
(/), not on the separate Flow Editor page (/my-trees). MyTreesPage is
restored to its original state. QuickStartPage gets the tab bar replacing
the 'My Flows' section header, with Create button visible on My Flows tab
only, and window focus reload to fix stale data after returning from editor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 03:52:32 -05:00
chihlasm
55d329e07b fix: keep is_public and visibility in sync on updates
When visibility changes to 'public', is_public=True. When it changes away
from 'public', is_public=False. When is_public is set via TreeUpdate,
visibility column is updated to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 03:36:23 -05:00
chihlasm
8545a123ab fix: make account_id and account_role nullable in User type and schema
The User model has account_id as Optional[UUID] but the frontend type
and backend schema declared it non-nullable. Solo users without a team
have no account, so both must allow null.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 03:34:55 -05:00
chihlasm
5cd1a4b81d feat: add tabbed dashboard with My Flows/My Team/Public/All views and fork UI
- Tabs filter by visibility scope; My Team hidden for solo users
- Data reloads on tab change and window focus (fixes stale-after-editor bug)
- Create button moves into My Flows tab header
- Fork button on flows not owned by current user; opens reason modal
- Author attribution shown on cards from other users

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 03:31:08 -05:00
chihlasm
e48049a36d feat: add visibility and author_name to TreeListItem type and list API params
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 03:27:02 -05:00
chihlasm
29c3d5eed6 feat: add visibility filter param and author_name to tree list endpoint
GET /trees now accepts ?visibility=private|team|link|public to scope results.
TreeListResponse includes author_name (full_name or email) and visibility.
Author names fetched in single query to avoid N+1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 03:25:26 -05:00
chihlasm
8c982a95ec fix: enforce visibility column in tree access filter
Previously build_tree_access_filter used is_public boolean and ignored the
visibility column entirely. Now private/link trees are only visible to their
author, team trees require matching account_id, and public trees are open to all.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 03:21:20 -05:00
chihlasm
2ff37d6dd9 docs: add visibility model, dashboard tabs, and fork UI implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 02:54:51 -05:00
chihlasm
1f8201a315 feat: improve AI builder UX - regenerate scaffold, Generate All layout, honest loading, 3-action review
- BranchSelector: add Regenerate button to re-trigger scaffold suggestions
- BranchDetailView: promote Generate All as primary action above Generate Detail/Skip
- GeneratingAnimation: replace rotating messages with plain honest status text
- TreePreviewCard: add Start Flow + Build Another alongside Open in Editor
- AIFlowBuilderModal: wire up handleStartFlow (navigates to flow) and handleBuildAnother (resets)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 01:38:45 -05:00
chihlasm
3a2470dca3 refactor: move Generate All into empty-state button group with subtle separator
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 01:12:23 -05:00
chihlasm
ad85502ca1 feat: add Generate All button and per-branch progress to AI builder detail stage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 00:52:17 -05:00
chihlasm
da5342496b feat: add generateAllBranchDetails and cancelGenerateAll to AI builder store
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 00:48:58 -05:00
chihlasm
bf005fa1f1 feat: add rotating activity messages to generation loading state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 00:46:42 -05:00
chihlasm
42fc3a5b6e fix: allow publishing clean drafts without requiring local edits
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 00:45:01 -05:00
chihlasm
7fb39924d0 docs: add AI builder UX improvements implementation plan
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 00:37:08 -05:00
chihlasm
770cad88a7 docs: add AI builder UX improvements design doc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 00:36:11 -05:00
chihlasm
2e02d4e6c1 fix: reset scaffold trigger guard when wizard returns to foundation phase
hasTriggeredScaffold ref was not reset on Start Over/close, preventing
scaffold() from firing on subsequent attempts after an error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 23:56:04 -05:00
chihlasm
fe43f5cb46 fix: improve AI corrective prompt clarity and add global next_node_id validation
- Rewrote CORRECTIVE_PROMPT_TEMPLATE to clearly distinguish option→child
  vs action→sibling next_node_id semantics with concrete examples
- Added global check in ai_tree_validator that action next_node_ids
  actually reference existing nodes in the tree (was silently unchecked)
- Added max_tokens truncation warning to branch_detail logger
- Added test for action next_node_id referencing nonexistent node

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 23:45:39 -05:00
chihlasm
6a76e61792 feat: standardize shared UI primitives across frontend 2026-02-23 22:07:17 -05:00