Repository navigation
refactor(app-shell): split StudioDesignSurface.tsx by responsibility - #37719
Conversation
…udioSurfaceScope.ts Move-only: the route segment's scope, the package-list facts, the base's customization and the package's apps leave StudioDesignSurface.tsx verbatim inside four hooks the body calls in the same order. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
… studioSurfaceSave.ts Move-only: the unsaved-work state, the departure question, the tab-close prompt and the unsaved-edits registration leave StudioDesignSurface.tsx verbatim inside one hook called where they stood. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…SurfaceDrafts.tsx Move-only: the Pending changes sheet and its ?changes= door, the publish and draft-save nonces, the pending-drafts ledger behind the badges and the kept publish refusals leave StudioDesignSurface.tsx verbatim inside two hooks called where the first of their lines stood. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…cePublish.ts Move-only: the backfill receipt's formatter and the one publish every door runs leave StudioDesignSurface.tsx verbatim inside one hook called where the publish stood. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…rfaceRightSlot.tsx Move-only: the slot's host gate, its open and mode state, the shortcut, the title row's assistant control and the slot element with its copilot leave StudioDesignSurface.tsx verbatim inside one hook called where the slot state stood; the frame mounts the element where it was drawn. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…rfaceNavigation.tsx Move-only: the retired-Interfaces landing notice's latch, the host side of the ?surface= channel, the menu re-entry and the command palette's Studio scope leave StudioDesignSurface.tsx verbatim inside two hooks called where they stood. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…rfacePage.tsx Move-only: the route switch the pillars host draws (the All metadata area, Overview with its Pending tab, the sharing overview and the not-found states) leaves StudioDesignSurface.tsx verbatim, re-indented, as a stateless component the host mounts where the switch stood. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…Frame.tsx Move-only: the providers, the two columns with the menu mount and the pillars host, the strips, the right slot's mount, the review sheet and the command palette leave StudioDesignSurface.tsx verbatim as a stateless component; the page is its children. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…dependencies The split hands five useState setters across a module boundary, where react-hooks/exhaustive-deps can no longer see they are stable. Naming them keeps the lint at the original file's warnings; a setter's identity never changes, so no callback is re-created. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…g lists The split moved the surface's code into eight sibling modules; the two source-reading tests that read the surface and the modules earlier move-only splits cut out of it now read these eight too. List additions only, no assertion changed. Claude-Session: https://claude.ai/code/session_01Utp6CbL6Nn3scsU8yvLyU4 Co-authored-by: Claude <noreply@anthropic.com>
…lit-studio-design-surface
|
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4 Final green head for L1/L2 (2026-11-27T00:04Z): Area notes:
Generated by Claude Code |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head fd1a2e0 · 2026-11-27T00:05Z |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: Read: card #37553 with all 5 comments (triage, claim, two os-dev reports, and claim amendment 7205603061), PR #37719 (its body and its 11-file list), the net diff Check-runs on the head: none failed. All eleven required contexts succeeded except ① Derived judgments
② Semver level
Clause-②: no The PR body and the claim both declare it, along with ③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 维护者速读
席位意见:ACCEPT。干净的纯重构,只剩 3 个 nit。 席位核对Head-sha:
|
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Approval requested (size limb: 3411 changed lines > 3000; not governed by path; not security-touching). Seat ACCEPT: comment 7206286955. Contract review PASS at |
<!-- claude-projects-attribution: {"github_login":"hotlong"} -->
_Requested by **Jack** · [project
thread](https://claude.ai/code/project/chan_01EF41AQooqveF2DGD8nqPzS?thread=cmsg_01EF41AQooqveF2DGD8nqPzSMJK8dtC6Pva5SVajbS4V1a)_
Fixes objectstack-ai#37682
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: updated here
## 维护者速读
- 用户看到的变化:控制台的问答聊天(侧边停靠和全页)和 Studio
照常可用;搭建应用那一套聊天界面(方案卡、变更卡、搭建结果、交接卡、诊断抽屉、草稿条、表格导入条、Studio
副驾驶面板)不再出现,旧的搭建地址会落到问答聊天。
- 为什么:搭建能力已经整体退役,这是退役专题里第一步,只删前端,不拆分组件、不改审批和提问卡。
- 出问题会怎样:最坏是问答聊天里某个按钮或文案缺失,或旧地址跳转不对;数据和元数据不受影响,回滚这一个合并即可。
- 需要你做的:不用做什么,席位做完合同级审查后排队合并。
## What changes
The build agent's chat frontend is deleted. Ask chat (dock and
`/ai/ask`) and Studio keep working; `/ai/build/…` addresses still
redirect to the ask chat.
- `@object-ui/plugin-chatbot`: the build-only cards (proposed plan,
proposed changes, build result and publish line, builder handoff,
designing-plan wait), their detectors, the build-progress mapping and
the 59 props that fed them.
- `@object-ui/app-shell`: the Build Doctor drawer, the pending-drafts
bar, the spreadsheet import bar, the maker start chips and empty state,
Studio's copilot panel and topbar entry, and the build branches in
`AiChatPage`, `ChatDock` and `ConversationsSidebar`.
- `@object-ui/i18n`: the 280 released keys only that UI read, and the
zh-Hant generator's `GATE_ONLY_KEYS`, which had nothing left to leave
out.
`publishHealthFromResponse` / `PublishHealth` stay: the preview's
Publish all reads them.
Both changesets say the removal is breaking (`!` in the summary line, a
**BREAKING** banner and `Clause-②: no (narrowing)`). The
`plugin-chatbot` README, which ships in the tarball, and
`content/docs/frontend/plugins/plugin-chatbot.mdx` no longer describe
the removed props and fields. The ADR-0087 marker is
`runtime-export-retired` for the package exports and
`no-migration-prescription` for the keys; `check-adr-0087-registration`
passes.
### Removed published exports, by package
**`@object-ui/plugin-chatbot`** (root entry)
- Functions: `detectDraftResult`, `detectProposedPlan`,
`detectProposedChanges`, `detectBuilderHandoff`,
`detectBuiltAppPackage`, `detectAuthoringVerdict`,
`detectReplayOutcome`, `buildProgressFromDraftReview`
- Types: `DraftReview`, `ProposedPlan`, `ProposedChanges`,
`BuilderHandoff`, `ReplayOutcome`, `PublishOutcome`
- Members of `ChatbotEnhancedToolInvocation` (and `SeamToolInvocation`):
`draftReview`, `proposedPlan`, `proposedChanges`, `builderHandoff`,
`replayOutcome`
- Members of `ChatbotEnhancedMessage` (and `SeamChatMessage`):
`buildProgress`, `blueprintProgress`
- Members of `ChatbotLabels`: `designingPlanLabel`, `designingPlanHints`
- Props of `FloatingChatbotProps` and `ChatbotEnhancedProps` (59 each,
the same set):
- Handlers: `onBuildMaterialized`, `onBuildResult`, `onDesignBuiltApp`,
`onDiscardDrafts`, `onDraftArtifacts`, `onOpenBuilder`,
`onOpenBuiltApp`, `onPlanApprovalPendingChange`, `onPreviewDraft`,
`onPreviewDraftApp`, `onPublishDrafts`, `onReviewDraft`,
`onReviewDrafts`
- Labels and messages: `builderHandoffOpenLabel`,
`builderHandoffSupersededTitle`, `builderHandoffTitleLabel`,
`changesAppliedLabel`, `changesApplyingLabel`, `changesConfirmedLabel`,
`changesConfirmHintLabel`, `changesConfirmLabel`,
`changesConfirmMessage`, `changesDraftedLabel`, `changesFailedLabel`,
`changesTitleLabel`, `changeVerbLabels`, `designBuiltAppLabel`,
`nextStepsLabel`, `openBuiltAppLabel`, `planAdjustLabel`,
`planAnswerMessage`, `planApproveDefaultsMessage`,
`planApproveHintLabel`, `planApproveLabel`, `planApproveMessage`,
`planAssumptionsLabel`, `planBuildingLabel`, `planBuildNewAppMessage`,
`planBuiltLabel`, `planDeferredLabel`, `planExtendExistingMessage`,
`planExtendLabel`, `planQuestionsLabel`, `planReadyLabel`,
`planTitleLabel`, `previewDraftLabel`, `publishDraftsLabel`,
`publishedLabel`, `resolveAppLabel`, `resolveFieldLabel`,
`resolveFieldTypeLabel`, `resolveObjectLabel`, `toolReviewLabel`,
`verifiedLabel`
- Behaviour: `autoPublishDrafts`, `fetchPendingDraftCount`,
`getArtifactAction`, `publishFromShellBar`, `subscribeMetadataRefresh`
**`@object-ui/plugin-chatbot/core`**
- Type: `PublishOutcome`
**`@object-ui/app-shell`**
- `ConversationsSidebar` prop `includeAskConversations` (the sidebar
lists the active agent's conversations)
**`@object-ui/i18n`**
- 280 translation keys released in `@object-ui/i18n@18.6.0`: 271
language-pack keys (209 from all eleven locales, 6 `console.ai.*Message`
keys from en and zh-Hans, the rest with their plural siblings) and 9
`engine.studio.copilot.*` / slot keys of the Studio namespace. The full
list is in `.changeset/37682-i18n-retire-build-chat-keys.md`.
## Tests
- Deleted the tests of the removed cards, bars, drawer, copilot panel
and detectors, and the i18n tests that only pinned removed keys
(`outbound-agent-messages`, the three maker scope tests, the zh-Hant
gate test).
- Kept and retargeted: `useChatConversation` cache sanitising now uses a
plain tool invocation; the `AiChatPage` runtime-message seam test uses
the ask agent and a pending approval; `ChatDock` request-context pins
that a build agent in the catalog binds no package; the ChatDock menu
test pins Share and Expand with no build doctor.
- Count pins adjusted where keys left (console namespace, de quote
pairing, count families, column-identity ratchet).
## Acceptance notes
Four leftovers are deliberately not in this PR. They are not build UI,
and removing them reaches past this card's surface. The seat decides
which ones to file:
1. **Builder-handoff plumbing**: `chatDockTarget.ts`
(`BuilderHandoffState`, `ChatDockHandoff`, `ambientAppPackage`),
`chatDockControl`, the handoff in `useConsoleChatDock`, and
`AiAddressRedirect`'s handoff branch. Nothing sets a handoff any more.
2. **The plan-approval bus and the launcher marker**: the plan-approval
channel on `assistantBus`, `usePlanApprovalPending`, and the pending
marker on `AssistantTopBarButton`. Nothing raises plan approval any
more.
3. **The surfaceAgent maker helpers**: the maker helpers in
`hooks/surfaceAgent.ts`, and `useChatConversation`'s `rekeyScope` and
legacy options that only served them.
4. **showDebug is always false**: `ChatDockConversation` always sends
`showDebug: false` now that the Build Doctor drawer is gone, and
`chatDockTarget`'s `showDebug` field has no reader.
One more build entry outside this diff:
`ui/apps/console/src/pages/system/AppManagementPage.tsx:691` still draws
an ungated "Edit with AI" button that opens `{ agent: 'build', packageId
}`. It behaved the same on main once build closed, so it is not this
diff's regression; the seat files it.
Smaller stale text, also left: a historical comment in
`ui/scripts/check-eager-closure-budget.mjs` naming the deleted bars, the
pending `ui/.changeset/12724-plan-card-posture.md` that describes the
deleted plan card, and comments in the preview's `usePublishAllDrafts`.
## Verification
Read first: `ui/packages/plugin-chatbot/src/index.tsx` (the export
list), `ui/packages/app-shell/src/console/ai/AiChatPage.tsx` (the
ask-only path that stays), and the two changesets.
Two-minute check: `pnpm --dir ui exec vitest run
packages/app-shell/src/layout/__tests__/ChatDock.requestContext-30043.test.tsx
packages/app-shell/src/console/ai/__tests__/AiChatPage.runtimeMessageSeam.test.tsx`
(the dock binds no package for a build agent; the full page keeps its
approval seam).
Main was merged in after objectstack-ai#37579 landed (Studio's top-left rows). Nine
Studio tests conflicted. Main's new tests that assert the copilot and
its AI assistant button were dropped with it; the rest keep main's
assertions, and the right slot's toggle stays the title row's only
control.
Two dispatch-gate fixes this change needed:
- `check-test-source-alias`: 17 tests that reach `AiChatPage` now load
`@object-ui/plugin-grid` at module top. The deleted spreadsheet import
bar used to load it during collection; without it, the page's own
`import('@object-ui/plugin-grid')` would be paid inside a clocked case.
- `check-hand-rolled-comment-mask`: the DEBT entry for
`console-namespace-3546.test.tsx` is deleted, because the code that
carried it went with the build keys. `check-vi-mock-specifiers`: the
`noTopBar-37456` suite's mock of the deleted `StudioAiCopilot` is
dropped.
<details><summary>Local readings</summary>
- `pnpm console:build`: 81 of 81 tasks succeeded.
- `tsc` in app-shell, both `tsconfig.json` and `tsconfig.test.json`:
exit 0 on the merged head.
- eslint `--quiet` over the 128 changed `.ts`/`.tsx` files: 0 errors.
- Affected suites before the merge: 707 files, 6156 tests passed.
- After the merge, `packages/app-shell/src/views/studio-design` plus
`packages/i18n`: 386 files, 4184 tests (4170 passed, 13 skipped, and 1
failure fixed and re-run green).
- `pnpm --dir ui exec vitest run scripts/`: 174 files (171 passed, 2
skipped, 1 failed: the vi.mock gate above, fixed, and its file re-run
green with 57 tests).
- dispatch-gates: all 42 derived commands ran before the merge. Three
failed and were fixed (ADR-0087 marker, test-source-alias, the scripts
suite). On the merged head, `check-adr-0087-registration --base
origin/main`, `check:test-source-alias`, `check:i18n-keys`,
`check:i18n-drift` and the scripts suite were re-run and exit 0.
`check-platform-checklist --changed-from origin/main` and
`check:new-line-citations` also exit 0.
- `check-i18n-dead-keys`: no new dead key, and 16 fewer than base.
- The full ui suite with `--maxWorkers=3` was still running at push
time. Its first attempt, run alongside `console:build`, was killed for
memory. CI's sharded run is the verdict; the local result goes in the
card report.
- Dogfood battery (`pnpm --filter @objectstack/dogfood test` under
`os-verify-lock`, closure built first) on head `18cec5f4`: running; the
reading goes in the card report.
- After objectstack-ai#37706 landed, main was merged again: the de-quote-pairing pin
is 129 (135 minus this PR's six spans).
- `overlap-check`: main merges cleanly. Two textual conflicts with open
PRs outside epic cloud#5027:
- objectstack-ai#37706 in `de-quote-pairing-3876.test.ts`: a count pin, 133 → 127 here
and 133 → 135 there.
- objectstack-ai#37719 in `StudioDesignSurface.tsx`: a move-only split of the file.
Whichever PR lands second takes the other's change.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Q4EjjMnLQVLzcho6g8WAL3)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q4EjjMnLQVLzcho6g8WAL3
<!-- signed: epic:objectstack-ai#5024#1 · hotlong · session_01Q4EjjMnLQVLzcho6g8WAL3
-->
---------
Co-authored-by: Claude <noreply@anthropic.com>
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4
Fixes #37553
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsxgoes from 1,550 lines (ate491fce2c7) to 383. It keeps its exports, its props and its default export, and now only composes: it calls the hooks below in the order their lines stood, then draws the frame with the page inside it.studioSurfaceScope.ts~orgor~all; the package-list facts (writable, name, missing, a read-only base's facts and its.custompair); the base's customization; the package's appsstudioSurfaceSave.tsstudioSurfaceDrafts.tsx?changes=reviewdoor, the publish and draft-save nonces, the pending ledger behind the badges and the Pending tab, the refusals a publish keeps on its entriesstudioSurfacePublish.ts~org), its toasts and the backfill receiptstudioSurfaceRightSlot.tsxstudioSurfaceNavigation.tsx?surface=, the menu re-entry, the command palette's Studio scopeStudioSurfaceFrame.tsxchildrenStudioSurfacePage.tsxEvery module is under 400 lines.
How it was cut. Eight move commits, one per module, each a verbatim move of a contiguous block into a hook or a component with the body calling it where the block stood. No rename. Two follow-up commits, kept apart from the moves: one lists five
useStatesetters in the dependency arrays of the moved callbacks that now receive them across a module boundary (onPackageChanged,onPackageRenamed,onDraftSaved,requestSurface,doPublish), and one adds a map of the split to the surface's header comment.What stays the same, and why it holds.
useRefand fiveuseCallback/useMemocalls (the publish now follows the ledger's callbacks), which run no effect.StudioSurfaceFrameandStudioSurfacePagehold no hooks and no state. They add two component layers with constant types, so nothing remounts, and every keyed element (key={packageId},key={scopeSegment}) keeps its key under the same parent. The DOM is the same.useStatesetter's identity never changes, so adding one to a dependency list re-creates no callback. Without it,react-hooks/exhaustive-depsadds five new warnings, because it cannot see that a setter passed from another module is stable. With it, the files carry the warnings the original carried.Tests.
No test file is edited, added or deleted.No test is added or deleted. Two source-reading tests gain list entries only (patch round, below); no assertion changes. Novi.mockneeded re-pointing: the new modules import the same module paths the surface imported, so every path mock still applies, and nothing mocked the surface itself.Read first (riskiest first)
studioSurfacePublish.ts,useStudioPublishAction: the 220-line publish moved whole. The risk is the parameter list, since every state setter and value it closed over is now passed in.StudioDesignSurface.tsx, the body ofStudioDesignSurfaceBody: the hook call order is what keeps the effect order. Compare it with the order of the blocks in the base file.StudioSurfaceFrame.tsx: the JSX is verbatim. The page went to{children}, the right slot to{rightSlot}.Tests
All of these ran at head
6a7446c9a4, the final commit, through the shared verification lock.pnpm --filter @object-ui/app-shell test --maxWorkers=2ran 2,456 files passed, 1 skipped (2,457) and 23,816 tests passed, 9 skipped. The skips were already there:no test file is touchedthis run, at6a7446c9a4, was before the patch round, and no test file had been touched yet.pnpm --filter @object-ui/app-shell type-checkis both programs,tsc --noEmitandtsc -p tsconfig.test.json. I also checked that the program sees the new modules: a stray prop added toStudioSurfaceFrame.tsxwas reported as TS2339, and the file was then restored from HEAD.--no-inline-config: 2exhaustive-deps, 1only-export-componentsand 5set-state-in-effect. Those are the same kinds and counts the base file gives over the same code. With inline config on, 0 errors: noeslint-disablewent stale.Suite and type-check verdict lines
Derived gate families (dispatch-gates, 21 derived, 21 run, all exit 0)
Console E2E: not run locally. It needs a built Console, and the live specs also need a running backend, which is more than this shared container carries next to the suite. CI's
Build & E2E UIandLive E2E UIjobs give the verdict. The specs that drive this surface areui/e2e/live/studio-editor.spec.ts,studio-object-designer.spec.ts,studio-customize-journey.spec.tsandstudio-detail-save-at-once.spec.ts. The threeui/e2e/studio-*.spec.tsspecs read other files (StudioItemHeader.tsx,StudioMenu.tsx,StudioDetailHeader.tsx), and this change does not touch them.Acceptance notes
The change is over the 3,000-line mark (+2,028 / −1,367 = 3,395, the move counted on both sides). AGENTS.md multi-agent discipline §7 (c) applies: it lands on an authorized approval or by the maintainer's merge.
Two source-reading tests have file lists that the moved bodies are not on. I left both alone because they are outside this card's file fence.
homeRecoveryRedirectsFollowDeclaration-7373.test.ts(alsoReadsfor the Studio site) andui/scripts/__tests__/spec-symbol-ledger-app-shell-7265.test.ts(SITES) each readStudioDesignSurface.tsxplus the modules earlier move-only splits cut out of it. The second file's header records the ruling that "a moved body stays in the reading list". Both stay green, because the moved code holds no launcher literal and no spec-named declaration. But until the eight new paths are added, neither test reads the moved code. That is two list additions with no change to any assertion, for whoever owns those files.The base file had a stale comment on its imports (
objectui#11773,objectstack#26858) above an import that no longer matched it. It stays where it was.A comment block on the import of the draft-envelope reader moved with that import into
studioSurfacePublish.ts.Patch round (claim amendment 7205603061, which widened the fence to two source-reading tests for list additions only). Commit
9828b29963adds the eight newstudio-design/module paths toalsoReadsfor the Studio site inhomeRecoveryRedirectsFollowDeclaration-7373.test.ts, and toSITESinui/scripts/__tests__/spec-symbol-ledger-app-shell-7265.test.ts. That is +16 / −0, and no assertion changed. Both tests pass (2 files, 49 tests).scripts/ablation-replace.mjs, with each restore checked against HEAD. A launcher literal injected intostudioSurfaceNavigation.tsxturns the Studio site's "does not hard-code the launcher path" case red; with that path also dropped fromalsoReads, the file is green (15/15). A localtype AppLikeinjected intostudioSurfacePublish.tsturns its rule-1 case red; with that path dropped fromSITES, the file is green (33/33). Each list entry is what brings the moved code under the scan.origin/mainwas merged once (fd1a2e0900). There was no conflict and nothing understudio-design/changed.Verification
Two-minute check:
git diff e491fce2c7 HEAD --color-moved=zebra -- ui/packages/app-shell/src/views/studio-design/shows almost every removed line coming back as a moved line. The lines that do not are imports, theexportkeyword on two helpers, the five dependency arrays, and the four wrapper lines where a JSX expression became areturnor aconst.How much of the split is a verbatim move
A script compared every line of the base file (trimmed) with the nine files after the split. Every original line outside the import blocks reappears verbatim, with seven exceptions, each on purpose:
publishRefusalKeyandNO_PUBLISH_REFUSALSgainexport.}, []);, occurs elsewhere in the file, so the script cannot flag it.return.{allScope ? (becamereturn allScope ? (.{slotHost && (becameconst rightSlot = slotHost && (.Of the 2,211 lines after the split, 1,612 match an original line. The rest are imports, module headers, hook signatures, return objects, and the props the frame and the page receive.
Generated by Claude Code