Commit Graph

192 Commits

Author SHA1 Message Date
chihlasm
4d92e0aeed refactor: migrate auth pages to new design system
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:25:54 -05:00
chihlasm
c47484c4cf fix: collapsed sidebar layout scaling and toggle button size
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:21:22 -05:00
Michael Chihlas
58a55f4d88 feat: remove workspace system, add pinned flows and label renames
Replace workspace system with pinned flows API (pin/unpin/list/reorder).
Rename user-facing labels: Tree→Flow, Procedure→Project. Add sidebar
nav sub-items for flow type filtering. Remove 11 workspace files,
add migrations 037-038, clean all workspace references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 12:06:10 -05:00
Michael Chihlas
336e37d018 feat: add activity notifications panel with session feed
- Bell icon shows dot indicator for recent activity
- Dropdown panel shows recent sessions with status icons
- Links to session detail and sessions list page

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 05:09:33 -05:00
Michael Chihlas
c8e67515b1 feat: add Quick Launch modal with actions and recent flows
- Zap button opens Quick Launch with create/navigate shortcuts
- Shows recent flows for quick session start
- Keyboard navigation support (arrows + enter)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 05:07:16 -05:00
Michael Chihlas
f334ba861b feat: add sidebar collapse, category/tag filtering, and workspace CRUD (Phase D)
- Sidebar collapse/expand toggle with icon-only rail mode (persisted)
- Sidebar category/tag clicks navigate to /trees with URL params
- TreeLibraryPage syncs filters from URL search params bidirectionally
- Workspace create modal with icon picker and auto-slug generation
- TopBar logo adapts to collapsed sidebar state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 05:05:25 -05:00
Michael Chihlas
09cd05e143 feat: add command palette search, dashboard rewrite, and shell height fixes (Phase C)
- Add ⌘K command palette with debounced search across flows and sessions
- Rewrite QuickStartPage as dashboard with stats, filters, sessions panel
- Fix h-[calc(100vh-4rem)] → h-full across all pages for CSS Grid shell
- Add active session count badge to sidebar Sessions nav item

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 01:53:55 -05:00
Michael Chihlas
d6f4286570 feat: add workspace system and sidebar layout (UI design system Phase A+B)
Backend: Workspace model, migration (036), schemas, CRUD API endpoints.
Adds workspace_id to trees and categories, seeds 4 default workspaces
per account, auto-assigns existing trees by tree_type.

Frontend: Complete AppLayout rewrite from top-nav to CSS Grid shell
with persistent sidebar + topbar. New components: WorkspaceSwitcher,
NavItem, CategoryList, TagCloud, TopBar, Sidebar. Dashboard components:
QuickStats, FiltersBar, SectionGroup, TreeListItem, SessionsPanel.
WorkspaceStore with localStorage persistence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 01:16:33 -05:00
Michael Chihlas
ef829f06a4 Major UI overhaul plans; Other random docs 2026-02-15 00:43:41 -05:00
Michael Chihlas
1b86f66954 feat: add --api-url flag to procedural flows seed script
Allows running against remote environments like Railway.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 23:48:55 -05:00
Michael Chihlas
771889ab4f feat: add reusable PasswordInput with show/hide toggle
Replaces all type="password" inputs site-wide with a PasswordInput
component that includes an eye icon toggle for visibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 23:22:19 -05:00
Michael Chihlas
e7d6f992c6 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>
2026-02-14 23:11:28 -05:00
chihlasm
57f429f33b feat: session sharing frontend (#76)
* feat: add session sharing types, API client, and utilities

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add SessionTimeline and ActionMenu reusable components

SessionTimeline extracts timeline/checklist rendering from SessionDetailPage
into a reusable component for both authenticated and public session views.
ActionMenu provides a dropdown action menu with keyboard/click-outside dismiss.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add ShareSessionModal and integrate into SessionDetailPage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add Share Progress popover to TreeNavigationPage

Replace the single "Copy for Ticket" button with a "Share Progress"
popover that offers three actions: Copy Progress Summary (existing PSA
export flow), Copy Share Link (auto-creates account-only share if
needed), and Manage Share Links (opens ShareSessionModal).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add public SharedSessionPage with tree preview

Add the public-facing shared session page at /share/:shareToken that
renders shared sessions without authentication. Includes error handling
for 401 (redirect to login), 403 (access denied), 404 (not found),
and 410 (expired). The page features a minimal header, session metadata,
SessionTimeline component, and a new SharedSessionTreePreview component
that renders the decision tree structure with the path taken highlighted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add My Shares management page with nav link

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address code review issues in session sharing

- Add useCallback for loadShares in ShareSessionModal (React hook deps)
- Use TreeStructure type instead of Record<string, unknown> for type safety
- Fix login redirect format to match LoginPage's expected state shape

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: add focused tests for session sharing utilities and API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve tree_structure type compatibility for shared session views

- Use TreeStructure & Record<string, unknown> intersection for JSONB flexibility
- Add explicit cast in SharedSessionTreePreview for recursive node rendering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add session sharing learnings to CLAUDE.md

Add gotchas #12 (TreeStructure vs Tree types) and #13 (login redirect
state format), note about npm run build strictness, and public route
pattern to Common Tasks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: procedural editor UX improvements

Add URL intake field type, fix variable name editing collapsing fields
(index-based keys/updates), auto-generate variable names by field type,
add section header as first-class step type, and simplify step editor
with "More Options" collapsible for advanced fields.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: allow section_header step type in validation, improve tag input

- Add 'section_header' to VALID_STEP_TYPES in backend validation so
  procedural flows with section headers can be published
- Replace procedural editor's inline tag input with TagInput component
  (supports autocomplete, Tab, comma, semicolon, and paste splitting)
- Add semicolon delimiter support to TagInput component

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add type-aware routing for procedural flows

Centralizes tree navigation routing via getTreeNavigatePath helper.
Fixes all pages to route procedural sessions to /flows/:id/navigate
instead of /trees/:id/navigate. Adds safety redirect in troubleshooting
navigator and resume support in procedural navigator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove unused index prop from IntakeFieldEditor

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 23:08:17 -05:00
chihlasm
6b4304ab92 fix: resolve eslint immutability error in StepChecklist
Pre-compute section header visibility before render instead of mutating
a variable during .map() callback, which violates react-hooks/immutability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 04:43:13 -05:00
chihlasm
350c977eda feat: add procedural flows with intake forms, navigation, and seed templates
Adds a new "procedural" tree type for linear step-by-step project workflows
(domain controller setup, M365 onboarding, VPN config, etc). Includes intake
form builder, two-panel step navigation, variable resolution, procedural
exports, 3 seed templates, and UI rename from "Trees" to "Flows".

Also archives 19 implemented plan docs and creates deferred features backlog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 04:13:52 -05:00
chihlasm
303570ca2c feat: add sensitive data redaction to export (Phase C)
Server-side regex redaction masks IPs, emails, bearer/API tokens, and
UNC paths in exported session content. Redaction runs post-generation
and post-variable-resolution with fail-closed error handling. Frontend
gets a "Mask Sensitive Data" toggle in the export preview modal with
a summary of what was redacted. 24 unit tests passing, frontend build clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 00:11:20 -05:00
Michael Chihlas
1172c5394f docs: save Phase C redaction planning state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 20:49:58 -05:00
chihlasm
938420a679 Merge pull request #75 from patherly/feat/export-phase-a
feat: export improvements — Phase A + Phase B
2026-02-13 18:30:31 -05:00
Michael Chihlas
f1577758f9 test: add Phase B tests for custom markers, detail levels, and summary block
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 13:12:52 -05:00
Michael Chihlas
11e426eeb1 feat(frontend): add detail level dropdown and summary toggle to export controls
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 13:01:41 -05:00
Michael Chihlas
808c8d49d1 feat(frontend): convert ExportPreviewModal to editable textarea with reset
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:59:44 -05:00
Michael Chihlas
0a67a846de feat: add summary block generation to all 4 export generators
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:57:55 -05:00
Michael Chihlas
c8f9cc1c4b feat: add format-aware command output truncation for standard detail level
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:56:16 -05:00
Michael Chihlas
28c969f06e feat: add [CUSTOM] markers to custom steps in all 4 export generators
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:54:45 -05:00
Michael Chihlas
f19e534ff4 feat(frontend): add include_summary and detail_level to SessionExport type
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:53:52 -05:00
Michael Chihlas
ea0f79fac0 feat: add include_summary and detail_level to SessionExport schema
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:53:19 -05:00
Michael Chihlas
c5adab1685 docs: update Phase B plan — fix test refs, placeholders, truncation formats
Addresses review feedback:
- Fix test file references (test_psa_export.py, not test_export.py)
- Use _make_session helper instead of nonexistent fixtures
- Format-aware truncation markers (markdown/html/text/psa)
- No placeholder leak: empty fields stay blank, not [Edit in preview]
- Markdown table escaping for pipe/newline chars
- Summary toggle error handling with checkbox revert
- Phase A prerequisite called out explicitly
- Document edit-reset behavior on summary toggle

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:22:41 -05:00
Michael Chihlas
4e9d269b53 docs: add Phase B export improvements implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:39:21 -05:00
Michael Chihlas
bce741bb0c docs: Phase B export improvements design
Covers B1 (summary block), B2 (custom step markers), B3 (detail levels),
B4 (editable preview). No migration needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:36:01 -05:00
Michael Chihlas
f8a14d8b4c fix: skip RESOLUTION section in PSA export for incomplete sessions
Mid-session "Copy for Ticket" no longer shows a misleading Resolution
section that echoed the last step's answer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 10:50:55 -05:00
Michael Chihlas
1869da4fcb feat(frontend): add mid-session Copy for Ticket to navigation page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 09:39:38 -05:00
Michael Chihlas
441ff2ae40 feat(frontend): add step cutoff control to export options
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 09:39:20 -05:00
Michael Chihlas
7dab7d7782 feat(frontend): add next_steps to types, completion modal, and detail page
- Add next_steps to Session, SessionUpdate, SessionComplete, SessionExport types
- Add Next Steps textarea to SessionOutcomeModal
- Update TreeNavigationPage consumer callback for next_steps
- Display next_steps with whitespace-pre-wrap on SessionDetailPage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 09:38:04 -05:00
Michael Chihlas
8797ae0261 feat: add step cutoff and mid-session export support
- max_step_index slices decisions in all 4 export formats
- Only set exported=True when session is completed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 08:58:03 -05:00
Michael Chihlas
69c95065b6 feat: add Resolution and Next Steps sections to all export formats
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 08:54:50 -05:00
Michael Chihlas
ae701ef066 feat: save next_steps on session completion and update
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 08:42:19 -05:00
Michael Chihlas
ec5c91c8e4 feat: add next_steps column and update session schemas
- Add next_steps TEXT column to sessions table via migration 034
- Add include_outcome_notes, include_next_steps, max_step_index to SessionExport
- Add next_steps to SessionUpdate, SessionResponse, SessionComplete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 08:32:20 -05:00
chihlasm
2fc4e69c38 feat: UX improvements — copy buttons, shortcuts modal, breadcrumb rewind, create tree CTA
- Add copy-to-clipboard buttons on command blocks (action + custom step nodes)
- Add keyboard shortcuts modal (?) with option loading spinners and [Esc] hint
- Restyle session timer as a pill badge for better visibility
- Add prominent "Create Tree" CTA to MyTreesPage header and empty state
- Make breadcrumb items clickable to rewind navigation to any previous step

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 02:19:24 -05:00
chihlasm
ad59446332 feat: user management — admin create, password reset, archive/delete, quick invite
Phase 1: must_change_password enforcement + change password endpoint/page
Phase 2: Admin user creation (M365-style) with temp password
Phase 3: Password reset (self-service forgot + admin-triggered)
Phase 4: User archive (soft delete) + hard delete with precheck
Phase 5: Quick invite from admin Users page

Also fixes:
- Auto-create subscription for accounts missing one
- Hard delete precheck ignores sole-member personal accounts
- Seed script patches tree nodes for validation compliance

Migrations: 031 (must_change_password), 032 (password_reset_tokens), 033 (user soft delete)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 01:42:51 -05:00
Michael Chihlas
b8f25f19eb Add M365 and additional networking seed trees 2026-02-12 16:13:18 -05:00
chihlasm
77d6621e75 Merge pull request #74 from patherly/feat/command-output-capture
feat: command output capture for troubleshooting sessions
2026-02-12 01:04:15 -05:00
chihlasm
577a2fbf2a feat: add command output capture to troubleshooting sessions (#57)
Engineers can now paste command output during action steps. Output is
stored in the session decisions JSONB, displayed in session review,
included in all 4 export formats with command context, and preserved
in session-to-tree conversions.

- Collapsible "Paste Output" textarea on action nodes with commands
- 10,000 character limit with live character count
- Works on both built-in and custom action steps
- Preloads output when revisiting a step via Go Back
- All exports show commands run alongside captured output

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 00:57:33 -05:00
chihlasm
9dbb8b8406 Merge pull request #73 from patherly/feat/admin-invite-user-management
feat: admin invite codes with plan assignment + user detail page
2026-02-11 23:52:18 -05:00
chihlasm
3c47292eaf feat: add resend capability for platform and account invite codes
Revoke-and-recreate flow for both invite systems with email delivery
via Resend API. Includes account invite email template and audit logging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 23:45:23 -05:00
Michael Chihlas
a1f5127e98 docs: update CLAUDE.md with invite API path and deps signature
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:52:13 -05:00
Michael Chihlas
50cb0fc7f0 feat: admin invite codes with plan assignment + user detail page
- Migration 030: add email, assigned_plan, trial_duration_days, email_sent_at
  to invite_codes with CHECK constraints
- Resend email integration (graceful degradation when API key not set)
- Invite codes now support plan assignment (free/pro/team) and trial duration (1-90 days)
- Registration applies invite code plan/trial to new subscription
- Auto-downgrade expired trials on authenticated access
- Enriched GET /admin/users/{id} with account, subscription, sessions, audit logs
- New endpoints: PUT /admin/users/{id}/subscription/plan and extend-trial
- Frontend: enhanced invite codes page with email, plan, trial fields
- Frontend: new user detail page at /admin/users/:userId
- Fixed API path drift: /invite-codes -> /invites
- 11 new backend tests, 416 total passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:42:58 -05:00
Michael Chihlas
a466400c5b fix(frontend): resolve session outcome modal ts build error 2026-02-11 19:25:37 -05:00
Michael Chihlas
06c66f5595 fix(frontend): resolve set-state-in-effect lint errors 2026-02-11 19:09:29 -05:00
Michael Chihlas
ca4ce7cad6 Implement session outcomes, step timing, and live timer fixes 2026-02-11 17:52:12 -05:00
Michael Chihlas
2a1ed4d250 docs: update CLAUDE.md with session quick wins (#51-#55)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 19:44:10 -05:00