Commit b36772b
feat: recipe panels system with Document Summarization (#27)
* docs: add recipe panels design document
Covers RecipeParams/PrepRecipeParams/PrepRecipeResult type separation,
generic RecipePanel with RecipePrepCook component, RECIPES registry
pattern, server-side prepRecipe orchestrator, and full testing strategy.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: add recipe panels implementation plan
12-task TDD plan covering shared types, sheet helpers, prepRecipe server
function, services wrapper, LockableField onUnlock, RecipePrepCook
component, RecipePanel, RecipesListPanel, and coverage thresholds.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add RecipeFieldConfig, RecipeParams, PrepRecipeParams, PrepRecipeResult types
* feat: add 'recipe' to PanelId, add RecipeDefinition interface
* feat: add findOrCreateColumn and writeColumn helpers to utils
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: update utils.ts header comment; guard writeColumn against empty array
- Replace misleading "no dependency on Apps Script globals" header with
accurate language about GAS objects received as arguments vs. singletons.
- Clean up makeSheet helper in tests: replace identity map with headers.slice().
- Guard writeColumn against empty values array to prevent GAS runtime error
when getRange is called with numRows=0; add corresponding test.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add prepRecipe server function and rollup global stub
Implements the prepRecipe() server function that accepts PrepRecipeParams,
writes Drive file URLs, system prompt, user prompts, and output column
headers to the active sheet using findOrCreateColumn/writeColumn helpers,
and returns a PrepRecipeResult with the populated row range and column names.
Also adds the matching global stub in rollup.config.js so Apps Script can
discover the function, and fixes a pre-existing PanelId type gap by adding
"document-summarization" to the union.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: revert out-of-scope document-summarization PanelId addition
Task 4 subagent incorrectly re-added "document-summarization" to PanelId
to suppress typecheck errors in sidebar-entry.ts. Those errors are expected
and will be resolved in Task 11 when sidebar-entry.ts is updated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add prepRecipe service wrapper
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: use PrepRecipeParams type in google.d.ts stub
Consistent with how runBatchAI uses RunConfig — unknown breaks type-level
contract for direct callers of google.script.run.prepRecipe.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add onUnlock callback to LockableField
* feat: add RecipePrepCook component with prep/cook state machine
* feat: add RECIPES registry with Document Summarization entry
* feat: add generic RecipePanel driven by RecipeParams
* feat: replace RecipesListPanel stub with data-driven RECIPES implementation
* fix: suppress double-alert on silent validation cancellation
When buildPrepParams() returns null (drive folder URL empty), recipe.ts
now rejects with null instead of new Error("cancelled"). RecipePrepCook
checks err !== null before alerting, so only the validation alert from
buildPrepParams fires. Test updated to assert alertMock called exactly once.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: register RecipePanel in router; remove DocumentSummarizationPanel stub
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test: add coverage thresholds for recipe-prep-cook, recipe, recipes-list
Also adds explicit return types to onPrep/onCook arrow functions in recipe.ts
to satisfy the ESLint explicit-function-return-type rule.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: use single tsconfig in jest transform to avoid ts-jest ConfigSet caching bug
ts-jest's TsJestTransformer._cachedConfigSets is a static array keyed by the
global Jest config object reference, not by per-transform tsconfig options. On
CI (1 worker), a server transformer running first would cache ConfigSet(tsconfig.json,
no DOM), causing all subsequent client transforms to reuse the wrong tsconfig and
fail with "Cannot find name 'document'". Consolidating to a single rule using
tsconfig.client.json eliminates the conflict — server code compiles cleanly with
DOM types in scope since it never references them.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 56d5a9f commit b36772b
23 files changed
Lines changed: 3394 additions & 45 deletions
File tree
- __tests__
- components
- panels
- docs/plans
- src
- client
- components
- panels
- recipes
- server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
0 commit comments