Skip to content

App Studio 改版(1-6):拆分 StudioDesignSurface.tsx——外框、发布/草稿、保存、右侧栏各成模块,纯重构不改行为 #37553

Done
0 of 1 issue completed

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

Filing gate: ③ · Source: the maintainer in the area thread, 2026-11-26 12:52Z: 「StudioDesignSurface 这个文件是不是应该分拆」. The area answered yes, after #37456. Sub-issue of #37424 (phase 1 tail, before phase 2).
Grade: area:ux · Task · p2 (takes the parent's grade) · evidence: origin/main 818615b9. The file is 1,745 lines. StudioDesignSurfaceBody alone runs from line 249 to the end (~1,500 lines) and holds the top bar, publish and drafts, save, the menu mount and the right slot. 71 test files are named after the surface. Phase 1 cards #37454, #37455 and #37456 all had to serialise on this one file.
Reader: area ux-37424 (seat repo:objectstack#5), an os-dev subagent after #37456 merges.

Blocked-by: #37456 (it deletes the top bar from this file; splitting first would collide with #37454 and #37456, both in flight).

维护者速读

What

Acceptance

  • No behaviour change: the full app-shell suite and the console E2E are green with no assertion edited except imports.
  • No module over ~400 lines, unless the PR body says why.
  • git log --follow friendly: move code in its own commits, separate from any renames.

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    priority:p2
    pm:blocked
    domain:ui
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ux · domain:ui · Task · priority:p2 · pm:blocked · size L; rationale: a behaviour-neutral split of the 1,745-line StudioDesignSurface.tsx, so that phase-1 Studio cards stop serialising on one file. Grade follows topic #37424; blocked by #37456.

  3. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

    Claim: PM loop, phase 1 tail
    Session: session_01Utp6CbL6Nn3scsU8yvLyU4
    Account: os-bill
    Branch: claude/issue-37553-split-studio-design-surface
    Worktree: objectstack-issue-37553
    Domain: domain:ui
    Seat: repo:objectstack#5
    Area: ux-37424
    File surface: ui/packages/app-shell/src/views/studio-design/** (the split of StudioDesignSurface.tsx into new sibling modules, plus import re-points in tests there); import re-points only in other ui/packages/app-shell/src/** and ui/apps/console/src/** files that import moved symbols; one .changeset/*.md if the package's changeset gate asks for one. ⛔ No behaviour, prop, address or copy change. ⛔ No assertion edited except imports; no test deleted, skipped or loosened. Stop on breach; explain in the report.
    Container & model: L, mode:subagent, model: default tier (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — refactor
    Premise: holds — read at origin/main 4111380789 2026-11-26T21:49Z. StudioDesignSurface.tsx is 1,550 lines after #37456 (PR #37579 merged).
    Blocked-by cleared: #37456 merged (PR #37579). Open PR #37599 (#37564) does not touch studio-design/**.
    Pre-claim lane: domain:ui.
    Prior rulings read: the maintainer's 「StudioDesignSurface 这个文件是不是应该分拆」 (2026-11-26 12:52Z) and the card's acceptance list.

  4. added
    pm:dispatched
    and removed
    pm:blocked
    on Nov 26, 2026
  5. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4
    os-dev-report

    {
      "issue": 37553,
      "status": "done",
      "branch": "claude/issue-37553-split-studio-design-surface",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37719",
      "session": "session_01Utp6CbL6Nn3scsU8yvLyU4",
      "premise_still_valid": true,
      "summary": "Pure refactor: StudioDesignSurface.tsx goes from 1,550 lines (base e491fce2c7) to 383 and keeps its exports, props and default export. The rest moved into eight sibling modules. Scope: studioSurfaceScope.ts, 338 lines. Save-entry plumbing: studioSurfaceSave.ts, 75. Drafts, Pending sheet and ledger: studioSurfaceDrafts.tsx, 203. Publish: studioSurfacePublish.ts, 338. Right slot and assistant: studioSurfaceRightSlot.tsx, 225. Navigation and palette: studioSurfaceNavigation.tsx, 164. Frame: StudioSurfaceFrame.tsx, 270. Page switch: StudioSurfacePage.tsx, 215. The work is eight move-only commits (no rename) plus two follow-ups: one adds five stable useState setters to the moved callbacks' dependency arrays, which keeps the eslint warnings equal to the base file's; the other maps the split in the surface's header comment. The hooks are called in the original order, so effect, subscription and fetch order is unchanged. The frame and the page are stateless components. No test file is touched, and no vi.mock needed re-pointing: the new modules import the same paths and nothing mocks the surface. The worktree was cut from origin/main e491fce2c7, not the 4111380789 named in the dispatch: main had moved, and nothing under studio-design changed between the two. The diff is +2,028 / -1,367 = 3,395 changed lines, over the 3,000 threshold of AGENTS.md section 7(c). Landing needs an authorized approval or the maintainer's merge.",
      "tests": "At head 6a7446c9a4 (final commit), under os-verify-lock. (1) Full app-shell suite: pnpm --filter @object-ui/app-shell test --maxWorkers=2 gave 'Test Files 2456 passed | 1 skipped (2457)' and 'Tests 23816 passed | 9 skipped (23825)', with lock line 'VERDICT command-exit 0 · held the lock 4088s'. The skips were already there, since no test file is touched. (2) pnpm --filter @object-ui/app-shell type-check, both programs (tsc --noEmit and tsc -p tsconfig.test.json): VERDICT command-exit 0. To check the program sees the new files, a stray prop was added to StudioSurfaceFrame.tsx. tsc reported TS2339 'Property bogusProp does not exist on type StudioSurfaceFrameProps' (exit 2), and the file was restored with git checkout HEAD. (3) eslint on the 9 files: 0 errors with --no-inline-config. Warnings: 2 exhaustive-deps, 1 only-export-components, 5 set-state-in-effect, the same kinds and counts as the base file over the same code. With inline config on, 0 errors, so no eslint-disable went stale. (4) Move proof: a script compared the base file line by line with the 9 files. Every non-import original line reappears verbatim except 7 deliberate edits: 2 'export' keywords, 3 dependency arrays the script can see (2 more share the spelling }, []);), a JSX comment's braces, and 2 wrapper lines. Ablation: none. No tested behaviour changed, so there is nothing to ablate. Console E2E: not run locally. It needs a built Console plus a backend for the live specs. CI jobs Build & E2E UI and Live E2E UI give the verdict. The live specs that drive the surface are e2e/live/studio-editor, studio-object-designer, studio-customize-journey and studio-detail-save-at-once.",
      "gates": "Local derived set: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 21 families. All 21 ran, each exit 0, captured before any pipe: check-closing-keyword-parity (+ --self-test), check-comment-mask-corpus, check-sdui-manifest (+ --self-test), spec check:duration-unit-keys, check:adr-anchors, check:dispatcher-error-vocabulary, check:driver-memory-census, check:gitlink-declared, check:nul-bytes, check:published-files, check:refd-timer-probe, check:registry-log-declared, check:rest-log-spy-declared, check:skill-identifier-liveness, check:test-source-alias, check:tier-file-adoption, check:undeclared-dep-imports, check:watch-hint-literal, and pnpm --dir ui exec vitest run scripts/ ('Test Files 172 passed | 2 skipped (174)', lock VERDICT command-exit 0). --ran reconciliation: '21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED (a DERIVED zero)'. Outside the derived set: node scripts/check-platform-checklist.mjs --changed-from origin/main exit 0 ('0 anchored files in the change set'). PR #37719 check-runs at 6a7446c9a4, read right after create: Check Changeset success (skip-changeset label), Governed Surface Queue Guard success. Lint · ESLint, Lint · repo & tooling gates, Lint · docs & code guards, Lint · CI, release & engine gates, Lint · PM dispatch-gates, Type Check · workspace/source gates/consumer gates/debt ledger, PR-body guards and Check PR Size were in_progress. The UI jobs (Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI) were not yet listed. All are NOT MEASURED here: the report is due when local verification ends, not when CI converges.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 strokes through the fleet-write relay. (1) pr_create, run 45911016255: POST /repos/objectstack-ai/objectstack/pulls (draft), POST /repos/objectstack-ai/objectstack/issues/37719/assignees (os-bill), POST /repos/objectstack-ai/objectstack/issues/37719/labels (skip-changeset). The read-back says 11001 bytes sent, 11001 stored, identical; assignee and label are listed. (2) post-stamped: POST /repos/objectstack-ai/objectstack/issues/37553/comments, this report. git push is not counted.",
      "open_questions": [
        {
          "question": "Should the eight new module paths join the reading lists of two source-reading tests? The tests are homeRecoveryRedirectsFollowDeclaration-7373.test.ts (alsoReads for the Studio site) and ui/scripts/__tests__/spec-symbol-ledger-app-shell-7265.test.ts (SITES). The second test's header records the ruling that a moved body stays in the reading list. Both tests are outside this card's file fence, so they were not edited.",
          "options": [
            "A: a patch round on this PR adds the eight paths to both lists. List additions only, no assertion changes.",
            "B: file a small follow-up card for the two lists.",
            "C: leave them. Both tests stay green, but neither reads the moved code."
          ],
          "recommendation": "A. It is mechanical, two lists in one PR, and it keeps the ruling on the split that caused the gap. The moved code holds no /home literal and no spec-named declaration, so both tests stay green after the addition."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: repo:objectstack#5 (PM seat) · noted, not filed: two source-reading tests do not yet read the eight new modules (homeRecoveryRedirectsFollowDeclaration-7373 alsoReads; ui/scripts spec-symbol-ledger-app-shell-7265 SITES); see open_questions",
        "carrier: none · noted in Acceptance notes, not filed: the surface's import block carries a stale comment (objectui#11773, objectstack#26858) above an import it no longer describes; already stale in the base file and left in place"
      ]
    }
  6. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4

    Claim amendment (area ux-37424) · 2026-11-26T23:30Z

    File surface adds two source-reading tests, for list additions only:

    • ui/packages/app-shell/src/**/homeRecoveryRedirectsFollowDeclaration-7373.test.ts: the alsoReads list for the Studio site.
    • ui/scripts/__tests__/spec-symbol-ledger-app-shell-7265.test.ts: the SITES list.

    Each list gains the eight new studio-design/ module paths from the split. That keeps the ruling in the second test's header: a moved body stays in the reading list. ⛔ No assertion changes and no other edits to those files.

  7. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4
    os-dev-report

    {
      "issue": 37553,
      "status": "done",
      "branch": "claude/issue-37553-split-studio-design-surface",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37719",
      "session": "session_01Utp6CbL6Nn3scsU8yvLyU4",
      "premise_still_valid": true,
      "summary": "Patch round, option A. Commit 9828b29963 adds the eight new studio-design module paths to the Studio site's alsoReads in homeRecoveryRedirectsFollowDeclaration-7373.test.ts and to SITES in ui/scripts/__tests__/spec-symbol-ledger-app-shell-7265.test.ts: +16/-0, list additions only, inside claim amendment 7205603061. Ablation shows both lists are load-bearing. origin/main was merged once with no rebase (merge commit fd1a2e0900, 7 incoming commits, no conflict, none under studio-design) and pushed. Every PR check on fd1a2e0900 completed: 38 success, 14 skipped, 0 failure, with no re-run needed. The PR stays a draft. I did not edit the PR body: os-dev.md says a sub-agent writes the PR body only at pr_create and the seat writes later edits, and os-dev.md overrides a dispatch order. The text to add is in open_questions.",
      "tests": "On fd1a2e0900 (merge head), under os-verify-lock. (1) The two list tests, in ui: vitest run on homeRecoveryRedirectsFollowDeclaration-7373.test.ts and scripts/__tests__/spec-symbol-ledger-app-shell-7265.test.ts gave 'Test Files 2 passed (2)', 'Tests 49 passed (49)'. That run was at 9828b29963; the same two files ran again in (3). (2) Ablation through scripts/ablation-replace.mjs. Every leg's restore was verified as 'blob == HEAD and git diff HEAD is empty'. Leg A: a '/home' literal injected into studioSurfaceNavigation.tsx turns homeRecovery red, case '... does not hard-code the launcher path', Tests 1 failed | 14 passed. Leg B: the same injection with that path deleted from alsoReads is green, 15 passed. Leg C: 'type AppLike = { probe: true };' injected into studioSurfacePublish.ts turns spec-symbol-ledger red, case 'rule 1 finds no spec-named local declaration in .../studioSurfacePublish.ts', 1 failed | 33 passed. Leg D: the same injection with that path deleted from SITES is green, 33 passed. The first attempt at legs A and B was a no-op: the replacement contained its own anchor, so ablation-replace refused it ('a drop of 0, not the declared 1') and no test ran. I re-ran them with an anchor that does not overlap. (3) After the merge: pnpm install --frozen-lockfile; then turbo build of the app-shell dependency closure (72 tasks, VERDICT exit 0); then pnpm --filter @object-ui/app-shell type-check (VERDICT exit 0); then vitest over packages/app-shell/src/views/studio-design/ plus the two list tests: 'Test Files 288 passed (288)', 'Tests 2413 passed (2413)', VERDICT exit 0. Declared narrowing: the full local app-shell suite was not re-run after the merge. The incoming main commits touch app-shell outside studio-design (kanban draft, objectViewOptions). The full UI suite verdict is CI Test UI, success on fd1a2e0900. The previous local full suite (2456 passed | 1 skipped) was at 6a7446c9a4.",
      "gates": "PR #37719 check-runs at fd1a2e0900, all completed. success: Auto Label; Build & E2E UI; Build UI Deps; Check PR Size; Dogfood Regression Gate; Governed Surface Queue Guard; Lint & Repo Gates; Lint UI; Lint · CI, release & engine gates; Lint · ESLint; Lint · PM dispatch-gates; Lint · docs & code guards; Lint · repo & tooling gates; Lint · scoped · query-options erasure; Lint · scoped · slot lookup & corpus; Lint · scoped · tooling self-tests; Live E2E UI; PR-body guards (claim · duplicate · Part-of · single-writer path); Plan Test UI shards; Test Core; Test UI; Test UI (1/16); Test UI (10/16); Test UI (2/16); Test UI (3/16); Test UI (4/16); Test UI (5/16); Test UI (6/16); Test UI (7/16); Test UI (8/16); Test UI (9/16); Type Check UI; Type Check · consumer gates; Type Check · debt ledger; Type Check · source gates; Type Check · workspace; TypeScript Type Check; filter. skipped (event or path selectors): 18.x upgrade harness (opt-in); Borrowed queue verdict; Build Core; Build Docs; Check Changeset; Dogfood Regression Gate (${{ matrix.shard }}/3); Dogfood Verify CLI; Packed-tarball smoke (opt-in); Plan Test Core shards; Queue verdict; Schedule gate · skip when a green push run covers the commit; Temporal Conformance (live PG + MySQL); Test Core (${{ matrix.shard }}/10); UI Published Artifacts. failure: none. No job was re-run. All eleven required contexts are green: Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI and Dogfood Regression Gate succeeded. Build Core is skipped on this PR event, which is its normal PR shape. The local derived gate set was not re-derived after the patch, so CI is the verdict for the patch's families. The first round's local set at 6a7446c9a4 had 21 of 21 run, exit 0.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "This round: 1 relay stroke, post-stamped POST /repos/objectstack-ai/objectstack/issues/37553/comments (this report). git push is not counted. The PR body was not PATCHed; see open_questions. CI was read with gh api GET only.",
      "open_questions": [
        {
          "question": "Conflict: the dispatch asked for the fence-amendment line and the list additions to be added to the PR body via post-stamped --body, but os-dev.md says a sub-agent writes the PR body only at pr_create and the seat writes any edit, and os-dev.md overrides a dispatch order. Should the seat write the text below into PR #37719's Acceptance notes?",
          "options": [
            "A: the seat adds this paragraph to Acceptance notes: Patch round (claim amendment 7205603061, which widened the fence to two source-reading tests for list additions only). Commit 9828b29963 adds the eight new studio-design module paths to `alsoReads` for the Studio site in `homeRecoveryRedirectsFollowDeclaration-7373.test.ts` and to `SITES` in `ui/scripts/__tests__/spec-symbol-ledger-app-shell-7265.test.ts` (+16 / -0, no assertion changed). Both tests pass: Test Files 2 passed, Tests 49 passed. Ablation, through scripts/ablation-replace.mjs with restores verified against HEAD: a launcher literal injected into studioSurfaceNavigation.tsx turns the Studio site's 'does not hard-code the launcher path' case red; with that path also dropped from `alsoReads` the file is green (15/15). A local `type AppLike` injected into studioSurfacePublish.ts turns 'rule 1 finds no spec-named local declaration in .../studioSurfacePublish.ts' red; with that path dropped from `SITES` the file is green (33/33, the case is gone). So each list entry is what puts the moved code under the scan. origin/main merged once (fd1a2e0900, no conflict, nothing under studio-design).",
            "B: leave the body as created and keep the record in this report comment only"
          ],
          "recommendation": "A, written by the seat, because the PR body is where the landing reviewer reads what changed and why."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted in Acceptance notes, not filed: stale import comment (objectui#11773, objectstack#26858) in the surface, already stale in the base file"
      ],
      "head_sha": "fd1a2e0900",
      "ci_conclusions": [
        "skipped: 18.x upgrade harness (opt-in)",
        "skipped: Borrowed queue verdict",
        "skipped: Build Core",
        "skipped: Build Docs",
        "skipped: Check Changeset",
        "skipped: Dogfood Regression Gate (${{ matrix.shard }}/3)",
        "skipped: Dogfood Verify CLI",
        "skipped: Packed-tarball smoke (opt-in)",
        "skipped: Plan Test Core shards",
        "skipped: Queue verdict",
        "skipped: Schedule gate · skip when a green push run covers the commit",
        "skipped: Temporal Conformance (live PG + MySQL)",
        "skipped: Test Core (${{ matrix.shard }}/10)",
        "skipped: UI Published Artifacts",
        "success: Auto Label",
        "success: Build & E2E UI",
        "success: Build UI Deps",
        "success: Check PR Size",
        "success: Dogfood Regression Gate",
        "success: Governed Surface Queue Guard",
        "success: Lint & Repo Gates",
        "success: Lint UI",
        "success: Lint · CI, release & engine gates",
        "success: Lint · ESLint",
        "success: Lint · PM dispatch-gates",
        "success: Lint · docs & code guards",
        "success: Lint · repo & tooling gates",
        "success: Lint · scoped · query-options erasure",
        "success: Lint · scoped · slot lookup & corpus",
        "success: Lint · scoped · tooling self-tests",
        "success: Live E2E UI",
        "success: PR-body guards (claim · duplicate · Part-of · single-writer path)",
        "success: Plan Test UI shards",
        "success: Test Core",
        "success: Test UI",
        "success: Test UI (1/16)",
        "success: Test UI (10/16)",
        "success: Test UI (2/16)",
        "success: Test UI (3/16)",
        "success: Test UI (4/16)",
        "success: Test UI (5/16)",
        "success: Test UI (6/16)",
        "success: Test UI (7/16)",
        "success: Test UI (8/16)",
        "success: Test UI (9/16)",
        "success: Type Check UI",
        "success: Type Check · consumer gates",
        "success: Type Check · debt ledger",
        "success: Type Check · source gates",
        "success: Type Check · workspace",
        "success: TypeScript Type Check",
        "success: filter"
      ]
    }
  8. removed
    pm:dispatched
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions