docs: update CLAUDE.md and CURRENT-STATE.md with latest features

Reflects session sharing, procedural editor UX improvements,
type-aware routing, and updated in-progress/next items.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michael Chihlas
2026-02-14 23:11:28 -05:00
parent 57f429f33b
commit e7d6f992c6
2 changed files with 24 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
# CLAUDE.md - Patherly / ResolutionFlow Project Context
> **Last Updated:** February 11, 2026
> **Last Updated:** February 14, 2026
---
@@ -33,16 +33,19 @@ When adding new pages/components: use "ResolutionFlow" branding, monochrome desi
- **Phase:** Phase 2.5 - Step Library Foundation (In Progress)
- **Backend:** Complete (25+ API endpoints, 100+ integration tests)
- **Frontend:** Core features complete, Tree Editor functional
- **Database:** PostgreSQL with Docker, 29+ migrations
- **Database:** PostgreSQL with Docker, 30+ migrations
- **Detailed status:** [CURRENT-STATE.md](CURRENT-STATE.md)
### What's In Progress
- Custom step continuation flow refinements (Phase 2.5)
- Tree forking from sessions with custom steps
- Procedural flows reusability and run lifecycle improvements (Phase 2)
- Step Library Frontend UI
### Recently Completed
- Session sharing: ShareSessionModal, SharedSessionPage, MySharesPage, share links with copy/manage
- Procedural editor UX: section headers as step type, "More Options" collapsible, URL intake field, tag input improvements
- Type-aware routing: centralized `getTreeNavigatePath` helper, procedural resume support, safety redirects
- Export improvements (Phases A-C): step cutoff, summary block, detail levels, editable preview, sensitive data redaction
---
@@ -85,10 +88,10 @@ patherly/
├── frontend/
│ ├── src/
│ │ ├── api/ # Axios client + endpoint modules
│ │ ├── components/ # common, layout, tree-editor, session, library, step-library, ui
│ │ ├── components/ # common, layout, tree-editor, session, procedural, procedural-editor, library, step-library, ui
│ │ ├── hooks/ # usePermissions, useSessionTimer, useKeyboardShortcuts
│ │ ├── pages/ # All page components
│ │ ├── store/ # Zustand stores (auth, treeEditor, userPreferences)
│ │ ├── store/ # Zustand stores (auth, treeEditor, proceduralEditor, userPreferences)
│ │ └── types/ # TypeScript interfaces
│ └── tailwind.config.js
├── CLAUDE.md # This file
@@ -226,6 +229,10 @@ navigate(`/trees/${newTree.id}/edit`)
**13. Login redirect state format:** `navigate('/login', { state: { from: { pathname: '/path' } } })` — LoginPage expects `state.from.pathname` (object), NOT a plain string.
**14. Type-aware routing for trees/sessions:** Always use `getTreeNavigatePath(treeId, treeType)` from `@/lib/routing` instead of hardcoding `/trees/:id/navigate`. Procedural flows use `/flows/:id/navigate`. Session resume passes `{ state: { sessionId } }`. TreeNavigationPage has a safety redirect for procedural trees.
**15. Session sharing types:** `TreeSnapshot` extends `TreeStructure` but session snapshots from the API include extra fields like `tree_type`. Use `tree_snapshot?.tree_type` to determine flow type from session data.
---
## RBAC & Permissions
@@ -257,6 +264,9 @@ navigate(`/trees/${newTree.id}/edit`)
- **Type organization:** Create in `types/`, export from `types/index.ts`, import with `import type { T } from '@/types'`
- **Scratchpad overlay:** `position: fixed`, `onOpenChange` callback for parent padding adjustment, `right-2` positioning
- **Custom step flow:** `CustomStepModal``PostStepActionModal``ContinuationModal` → custom step view. Key state: `pendingStep`, `pendingContinuationNodeId`, `customBranchMode`, `branchOriginNodeId`. Use `findCustomStep()` not `findNode()` for custom step UUIDs.
- **Session sharing:** `ShareSessionModal` manages share links, `SharedSessionPage` renders public/account views. Helper utils in `lib/sessionShare.ts`. Share URLs use `/shared/sessions/:token`.
- **Procedural navigation:** `ProceduralNavigationPage` handles intake forms, step-by-step execution, and resume via `location.state.sessionId`. Uses `StepChecklist`, `StepDetail`, `ProgressBar`, `CompletionSummary` components.
- **Routing helper:** Use `getTreeNavigatePath()` and `getTreeEditorPath()` from `@/lib/routing` for all tree/session navigation.
---

View File

@@ -2,7 +2,7 @@
> **Purpose:** Quick-reference file showing exactly where the project stands.
> **For Claude Code:** Read this first to understand what's done and what's next.
> **Last Updated:** February 11, 2026
> **Last Updated:** February 14, 2026
---
@@ -14,7 +14,7 @@
### Backend (100%)
- FastAPI project structure with 25+ API endpoints
- PostgreSQL database with Docker, 29+ Alembic migrations
- PostgreSQL database with Docker, 30+ Alembic migrations
- User authentication (JWT, register, login, refresh, logout, invite codes)
- Refresh token rotation with JTI-based revocation
- Trees CRUD with full-text search (FTS index)
@@ -50,6 +50,9 @@
- Delete tree button in all view modes
- **Session Outcomes** — Outcome modal on session completion, step timing tracking
- **Settings page** at `/settings` — Default export format preference
- **Session Sharing** — ShareSessionModal, SharedSessionPage (`/shared/sessions/:token`), MySharesPage (`/my-shares`), share link copy/manage from navigation page
- **Procedural Editor UX** — Section headers as first-class step type, "More Options" collapsible for advanced fields, URL intake field type, improved tag input (comma/semicolon/Tab delimiters)
- **Type-aware Routing** — Centralized `getTreeNavigatePath` helper, procedural sessions route to `/flows/:id/navigate`, resume support in procedural navigator, safety redirect in troubleshooting navigator
### Security Hardening (Phases A-D Complete)
- Registration role hardcoded to `engineer`
@@ -67,12 +70,8 @@
### Backend Schema Features (Not Yet in Frontend)
- **Tree Forking** (migration 022) — `parent_tree_id`, `root_tree_id`, `fork_depth`, `fork_reason`
- **Session Sharing** (migration 023) — `session_shares`, `session_share_views`, `allow_public_shares`
- **Tree Sharing** (migration 024) — tree share links
- **Tree Status** (migration 025) — status field on trees
- **Admin Panel Tables** (migration 026) — plan limits, feature flags
- **Session Variables** (migration 028) — variable tracking in sessions
- **Session Outcomes** (migration 029) — outcome tracking
- **Enhanced Invite Codes** (migration 030) — email, assigned_plan, trial_duration_days
### Documentation
- CLAUDE.md (project context for Claude Code)
@@ -88,9 +87,8 @@
| Task | Status | Notes |
|------|--------|-------|
| Step Library Frontend | In Progress | Backend complete, frontend UI pending |
| Custom Step Flow | In Progress | Integration with tree navigation |
| Procedural Flows Lifecycle | In Progress | Resume support done, full run chooser/reuse pending |
| Tree Forking UI | Planning | Backend schema complete (migration 022) |
| Session Sharing UI | Planning | Backend schema complete (migration 023) |
---
@@ -98,9 +96,8 @@
### Immediate (Phase 2.5 Completion)
1. Step Library Frontend UI (browse, search, rate/review)
2. Custom Step Integration in tree navigation
2. Procedural Flows run lifecycle (RunChooserModal, intake reuse/prefill)
3. Tree Forking UI and workflow
4. Session/Tree Sharing UI
### Soon (Phase 3)
- File attachments for sessions