Skip to content

feat: recipe UX variants — V1 (4-button), V2 (2-button), V3 (step-by-step)#96

Open
aaronbrezel wants to merge 23 commits into
developfrom
feature/recipe-ux-variants
Open

feat: recipe UX variants — V1 (4-button), V2 (2-button), V3 (step-by-step)#96
aaronbrezel wants to merge 23 commits into
developfrom
feature/recipe-ux-variants

Conversation

@aaronbrezel

Copy link
Copy Markdown
Member

Summary

Three A/B test UX variant panels for the Document Summarization recipe, implemented as throwaway prototypes on a dedicated branch. Each explores a different interaction pattern before we settle on an official recipe UX direction.

  • V1 (4-button) — Explicit prep step required; Test and Cook fire inference directly without going through ConfigureAIRunPanel; Configure AI is the escape hatch. 5-state machine: idle → prepping → prepped → testing/cooking → prepped.
  • V2 (2-button) — No prep step; Test silently preps + runs first 10 rows; Cook silently preps + runs all rows. Designed to feel like a true one-click pipeline.
  • V3 (didactic step-by-step) — Three named stages: Import Files → Import Prompt → Run. Steps 2 and 3 unlock sequentially. Editing Step 1 re-locks Step 3 only (Step 2 prompt config is independent of folder choice).

Architecture

  • 3 new panel files (recipe-v1.ts, recipe-v2.ts, recipe-v3.ts) plus test files
  • 3 new recipe entries in RECIPES with variant field for routing
  • buildRunTemplate exported from recipe.ts for variant panels to import
  • RecipesListPanel routes by definition.variant; falls back to "recipe" for originals
  • Output column created at inference time via runBatchAIfindOrCreateColumn, not during prep
  • No server code touched; all variant code is self-contained and removable

Test Plan

  • 530 tests pass (npm test)
  • Deploy to add-on: npm run deploy
  • Open SSI Tools → Run AI → Browse Recipes — verify V1, V2, V3 entries appear
  • V1: Prep → columns appear in sheet; Test → AI output in row 2; Cook → all rows get output; Configure AI → opens settings panel
  • V2: Test → silently preps + runs first 10 rows; Cook → silently preps + runs all rows
  • V3: Import Files (Step 1) → Step 2 unlocks; Import Prompt (Step 2) → Step 3 unlocks; Test/Cook/Configure AI work as expected
  • Editing any input in V3 re-locks Step 3 but not Step 2

Removal Plan

To remove a variant: delete its panel file, its recipe entry in recipes.ts, its registration line in sidebar-entry.ts, and its routing case in recipes-list.ts. No server code is touched.

🤖 Generated with Claude Code

aaronbrezel and others added 23 commits May 6, 2026 16:56
Implements the V1 recipe variant panel with Prep/Test/Cook/Configure AI
buttons, state machine (idle/prepping/prepped/testing/cooking), and full
test coverage (12 tests).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…test

All three recipe variant panels updated based on user testing feedback:
- Buttons are now vertically stacked and numbered in intended order
- Helper text is attached directly below each button instead of a bottom block
- Test and Cook now dispatch to jobStore for progress bar visibility
- All test actions run 5 rows instead of 1 (V1/V3) or 10 (V2)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace separate helper-text paragraphs with a two-span button layout
(.recipe-btn-main + .recipe-btn-sub) so context lives inside each button.
Remove "▸ 5 rows" / "▸ All" labels now redundant with inline subtitles.
Add #prep-status success indicator to V1 after prep completes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PrepRecipeParams now accepts an optional rowRange. prepRecipe uses it as
the floor for numRows when no list-drive-folder column is present, so
template/fill-value strategies write to the same number of rows that
Step 1 imported. RecipeV3Panel passes this.rowRange in buildStep2Params.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each step is now a badge + connector layout. Badge color communicates
state: gray outline (locked), blue (active), green ✓ (complete).
A vertical line connects badges; it turns green when the step above is
complete. Locked step content fades to 45% opacity. Removes the raw
lock emoji in favor of data-step-state attribute driven entirely by
applyLockState.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sidebar was 300px — too narrow for the two-line button layout after
stepper badge and padding overhead. 360px gives ~60px more content width.
Stepper gap 12→14px, step content padding-bottom 20→24px, label
margin-bottom 4→6px for better vertical rhythm.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
360px still felt cramped. 420px gives more comfortable content width.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setWidth() is a no-op for sidebars — Sheets controls the width.
Reduce container padding 16px→12px, stepper badge 24→20px,
stepper gap 14→10px to recover horizontal space within the fixed width.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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