Draft trees and custom steps #25

Closed
opened 2026-02-03 23:47:07 +00:00 by chihlasm · 1 comment
chihlasm commented 2026-02-03 23:47:07 +00:00 (Migrated from github.com)

Overview

Enable users to save incomplete trees and custom steps as drafts, allowing them to return later to finish editing without validation errors blocking their work.

Use Cases

  • Building a complex tree over multiple sessions
  • Starting a tree without all solution nodes defined
  • Experimenting with tree structures before publishing
  • Saving custom steps for later refinement

Design Document

See detailed design: docs/plans/2026-02-03-draft-trees-feature.md

Key Features

Trees

  • Add status field: draft | published
  • Draft trees: skip validation, only visible to author
  • Published trees: require validation, visible per sharing settings
  • "Publish" button for drafts (enabled when validation passes)
  • "Show my drafts" filter in Tree Library

Step Library

  • Same draft/published status for custom steps
  • Draft steps visible only to author
  • Can be refined and published later

Database Changes

  • Add status column to trees table (default: published)
  • Add status column to step_library table (default: published)
  • Migration handles existing data (all set to published)

API Changes

  • GET /api/v1/trees?include_drafts=true - include user's drafts
  • GET /api/v1/trees/{id}/can-publish - check if draft can be published
  • Same for step library endpoints
  • Validation runs only when publishing, not when saving drafts

Frontend Changes

  • Tree Library: "Show my drafts" toggle, draft badge on cards
  • Tree Editor: "Save Draft" / "Publish" buttons based on status
  • ValidationSummary: Different messages for draft vs published mode
  • Step Library Browser: Draft filter and status badges

Dependencies

  • Prerequisite: Issue #1 (Tree Editor Validation) - must be complete first
  • Enhances: Issues #10, #9, #8 (Step Library) - draft custom steps

Implementation Phases

  1. Backend Foundation (trees)
  2. Frontend Trees
  3. Backend Step Library
  4. Frontend Step Library

Success Metrics

  • Target: 60% of users with 5+ trees use draft feature within 2 months
  • Track: Draft creation rate, publish completion rate, time to build complex trees

Priority

Medium - Valuable workflow improvement, but not blocking core functionality

Plan to implement in Phase 3 after Step Library frontend is complete.

## Overview Enable users to save incomplete trees and custom steps as drafts, allowing them to return later to finish editing without validation errors blocking their work. ## Use Cases - Building a complex tree over multiple sessions - Starting a tree without all solution nodes defined - Experimenting with tree structures before publishing - Saving custom steps for later refinement ## Design Document See detailed design: `docs/plans/2026-02-03-draft-trees-feature.md` ## Key Features ### Trees - Add `status` field: `draft` | `published` - Draft trees: skip validation, only visible to author - Published trees: require validation, visible per sharing settings - "Publish" button for drafts (enabled when validation passes) - "Show my drafts" filter in Tree Library ### Step Library - Same draft/published status for custom steps - Draft steps visible only to author - Can be refined and published later ## Database Changes - Add `status` column to `trees` table (default: `published`) - Add `status` column to `step_library` table (default: `published`) - Migration handles existing data (all set to `published`) ## API Changes - `GET /api/v1/trees?include_drafts=true` - include user's drafts - `GET /api/v1/trees/{id}/can-publish` - check if draft can be published - Same for step library endpoints - Validation runs only when publishing, not when saving drafts ## Frontend Changes - Tree Library: "Show my drafts" toggle, draft badge on cards - Tree Editor: "Save Draft" / "Publish" buttons based on status - ValidationSummary: Different messages for draft vs published mode - Step Library Browser: Draft filter and status badges ## Dependencies - **Prerequisite:** Issue #1 (Tree Editor Validation) - must be complete first - **Enhances:** Issues #10, #9, #8 (Step Library) - draft custom steps ## Implementation Phases 1. Backend Foundation (trees) 2. Frontend Trees 3. Backend Step Library 4. Frontend Step Library ## Success Metrics - Target: 60% of users with 5+ trees use draft feature within 2 months - Track: Draft creation rate, publish completion rate, time to build complex trees ## Priority **Medium** - Valuable workflow improvement, but not blocking core functionality Plan to implement in **Phase 3** after Step Library frontend is complete.
chihlasm commented 2026-02-08 04:07:22 +00:00 (Migrated from github.com)

Implemented draft tree status with conditional validation. Trees can be saved as drafts without validation, then published when ready. Includes draft badges in all views, split Save Draft/Publish buttons in editor, and 'Show my drafts' toggle in library. Backend validation system ensures only valid trees can be published. 20 tests passing. Completed in commits c7b2c59 and 996b664.

✅ Implemented draft tree status with conditional validation. Trees can be saved as drafts without validation, then published when ready. Includes draft badges in all views, split Save Draft/Publish buttons in editor, and 'Show my drafts' toggle in library. Backend validation system ensures only valid trees can be published. 20 tests passing. Completed in commits c7b2c59 and 996b664.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: chihlasm/resolutionflow#25