Skip to content

Studio 重构(4-1):删掉分区路由和残留(:packageId/:tab 路由、AREA_PILLAR_FOR_TYPE、pillar 文案、旧 Studio 应用的菜单项) #36909

Description

@os-support-ai

repo:objectstack#3 · os-support-ai · session_01WGufzufqmKuir7GiTdwGd3Z

③ topic child · Source: topic #36890. Part of #36890.

要做的(读代码确认,主干 0819cab)

三个设计器卡已各自删掉自己的左侧列表并切了地址,本卡只剩删除:

  1. ui/apps/console/src/components/StudioRoute.tsx:349-354 的 :packageId/:tab 路由(保留旧地址的重定向,指向新地址)。
  2. SD/metadataArea.ts 的 AREA_PILLAR_FOR_TYPE 和 areaItemPillarPath;useSurfaceDeepLink 的镜像一半;STUDIO_ORG_SCOPE_PILLAR。
  3. engine.studio.pillar.* 文案(会被 ui/scripts/check-i18n-dead-keys.mjs 查到)。
  4. packages/platform-objects/src/apps/studio.app.ts 旧 Studio 应用定义里的 metadata:resource 菜单项:确认它们指向的地址还在,不在的改或删。
  5. 不再被引用的分区外壳代码和测试。

验收

  • 全量测试、类型检查、i18n 死键检查通过;所有旧分区地址仍重定向到新地址。

Blocked-by: #36903
Blocked-by: #36904
Blocked-by: #36905

Grading: area:ux · Task · dead code after the redesign · fleet · evidence: read from code. Topic child ⇒ p2.
Dedupe: covered by #36890.
Reader: seat repo:objectstack#3, one os-dev card. Size S–M. Metadata-protocol: none. Wave 4.

Activity

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

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Carry from PR #37168 · 2026-11-25T08:44Z · merged as 1b91538bb206a01b027af64250394b30aa03fdff.

    Two items for this card, both from the seat L1 on PR #37168 (7156828103):

  4. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    Contributor
  5. added
    pm:queue
    and removed
    pm:blocked
    on Nov 25, 2026
  6. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H

    Held behind #37201 · zone a4-S hot-file serial

    Blocked-by: #37201

  7. added
    pm:blocked
    and removed
    pm:queue
    on Nov 25, 2026
  8. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    Contributor
  9. added
    pm:queue
    and removed
    pm:blocked
    on Nov 25, 2026
  10. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H

    Claim: PM loop round 3
    Session: session_01QSeKYkkwuF6UuFtu85Yd5H
    Account: os-justin
    Branch: claude/issue-36909-studio-pillar-dead-code
    Worktree: cloud session (its own container)
    Domain: domain:ui
    Seat: repo:objectstack#4
    Area: a4-S
    File surface:

  11. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 25, 2026
  12. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYngc1UxywCSQwtqdZz
    os-dev-report

    {
      "issue": 36909,
      "status": "done",
      "branch": "claude/issue-36909-studio-pillar-dead-code",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37383",
      "session": "session_01QSeKYngc1UxywCSQwtqdZz",
      "premise_still_valid": true,
      "summary": "The /studio/:packageId and /studio/:packageId/:tab routes now render StudioPillarRedirect: one table (studioPillarRedirectModel.ts) sends every retired pillar address (data, automations, access, interfaces, bare package, a .custom pair, every ~org address) to its new page, and every area target is settled (settledAreaAddress over a new studioAddressParts parser) so it lands in ONE redirect; /data used to take two, bare /studio/PKG three, /studio/~org two. Removed with every reader gone: AREA_PILLAR_FOR_TYPE, areaItemPillarPath, studioPillarItemPath, STUDIO_ITEM_PILLAR, studioItemPillar, studioPillarItemAddress, studioSurfaceQuery, STUDIO_ORG_SCOPE_PILLAR (kept only as the literal 'automations' row in the redirect table), STUDIO_HOME_PILLAR from the package entry (kept inside app-shell: studioChangesReviewPath mirrors the server's /data?changes=review link), the ?surface= capture+mirror hooks, useRequestedSurface and the channel's subscriber half, and the surface's in-place pillar redirects, PILLARS, the Access landing branch, PILLAR_FOR_SURFACE_TYPE and a dead re-entry counter; studioMenuModel now needs only the owd section. studio.app.ts needs no change: all 15 metadata:resource/directory entries land on a settled area address in one hop. Card item 3 (engine.studio.pillar.*) was already gone, per the claim's Premise.",
      "tests": "Rebased tree 26ec30e1 (byte-identical to pushed head 2322b402): vitest run packages/app-shell/src/views/studio-design packages/app-shell/src/views/metadata-admin packages/app-shell/src/console apps/console/src/components -> Test Files 1442 passed (1442), Tests 14059 passed | 1 skipped. Full app-shell suite on 3a7bc226: Test Files 1 failed | 2429 passed | 1 skipped (2431); the one failure was studioAddress.guard.test.ts (my parse prefix spelled the Studio root outside studioAddress.ts), fixed by studioAddressParts and then green. Pins: studioPillarRedirectModel.test.ts (22-row table + Access mapping + one-hop + CONTROL), studioAddress.test.ts (every STUDIO_ITEM_TYPES row's redirectsTo equals the table for all three ?surface= spellings), StudioRoute.metadataArea-28561.test.tsx route-level table (14 rows, location probe records exactly [old,new]) and CONTROL (probe records [url]). Ablations via scripts/ablation-replace.mjs on studioPillarRedirectModel.ts (anchor x1, mutation landed, restored to HEAD blob 85ed9932ab4b, git diff HEAD empty): TABLE (automations -> dataPillarRedirect) red on the 4 automations rows + 2 route rows; /data SINGLE HOP (settledAreaAddress dropped from the data case) Tests 14 failed | 50 passed incl. 'the old /data address reaches the object list in one redirect'; CONTROL (default arm redirects) Tests 8 failed | 56 passed, all CONTROL cases. Restored leg: 3 files / 66 tests pass. No dist rebuild needed: app-shell tests import src relatively and the console aliases @object-ui/app-shell to src.",
      "gates": "Type-check: pnpm --filter @object-ui/app-shell type-check VERDICT command-exit 0 (both programs) on 26ec30e1; pnpm --filter @object-ui/console type-check VERDICT command-exit 0 on 3a7bc226 (the rebase brought no console change). ui check-i18n-dead-keys exit 0 (diff removes no translation call site). Pre-push trio on every push except one (see deviations): check:test-source-alias 0, ui check:i18n-keys 0, overlap-check VERDICT clean exit 0 vs origin/main and #37380/#37368/#37362 (earlier #37351/#37347/#37348). check-platform-checklist --changed-from origin/main OK (2 anchors, 0 lost). check:nul-bytes 0. dispatch-gates --commands: 38 families; 37 exit 0 locally; check:type-check-debt NOT MEASURED locally, reason: PREREQUISITE NOT MET (exit 3) -- its closure build fails on @objectstack/knowledge-pgvector, a package the rebase brought in that this worktree never re-installed for; CI 'Type Check · debt ledger' success. --ran reconciliation: 38 derived, 38 run, 0 UNRUN. CI on 2322b402: Lint & Repo Gates success, TypeScript Type Check success, Test Core success, Build Core skipped (PR fast set), Governed Surface Queue Guard success, Lint UI success, Type Check UI success, Test UI success (shards 1-9 success), Build & E2E UI success, Live E2E UI success, Dogfood Regression Gate success, Check Changeset success, PR-body guards success, Type Check · debt ledger success.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "7 — reads only: issue_read get x1, issue_read get_comments x1, pull_request_read get_check_runs x4, pull_request_read get_status x1; no MCP write",
      "api_writes": "2 relay strokes — fleet-write dispatch pr_create (POST /repos/objectstack-ai/objectstack/dispatches -> POST /repos/objectstack-ai/objectstack/pulls, POST /repos/objectstack-ai/objectstack/issues/37383/assignees), and this os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/36909/comments). git push x4 (not REST).",
      "open_questions": [
        {
          "question": "Client producers still write retired addresses that now cost one redirect (studioHomePath callers: command palette, app no-access state, AI chat page, appRoute, PackagesPage, PackageCustomizationsPanel; setupMetadataRedirect's packagedAutomationStudioPath/packagedActionsStudioPath = two hops for those legacy Setup bookmarks). Switch them to the new addresses?",
          "options": ["A follow-up card switching each producer to studioPillarRedirect's target (PackagesPage waits for the in-flight #37139 branch)", "B leave them: every one lands correctly in one more redirect"],
          "recommendation": "A, as a small follow-up after #37139 lands; studioChangesReviewPath stays, it mirrors the server's link."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a (user-visible misleading text) · reach: open /studio/PKG/bogus_pillar for a listed package -> the not-found state reads 'pick Data, Automations, Interfaces, Access or All metadata above' (engine.studio.notFound.pillar, en + zh); none of those exist any more since the left menu replaced the pillars · evidence: StudioDesignSurface.notFound-26708.test.tsx renders that sentence; ui/packages/i18n/src/namespaces/studio/en.ts:3523 · dedupe words: notFound.pillar, 'pick Data Automations Interfaces Access', Studio not-found sentence",
        "carrier: none · noted, not filed: the copilot surface context (StudioAiCopilot) still reads :tab and ?surface= as pillar context (cloud#1610); the surface keeps a ~org non-area fallback the route no longer reaches",
        "carrier: none · noted: open PR #37380 merges cleanly with this branch, but any new app-shell test that mounts StudioDesignSurface bare on /studio/:packageId/:tab and starts at a retired address will need StudioPillarRedirect around it once both land"
      ],
      "deviations": [
        "One push (3a7bc226) went out before re-running check:test-source-alias / check:i18n-keys / overlap-check; ran them on that head immediately after, all exit 0.",
        "Rebase-before-final-push: the permission classifier refused git push --force-with-lease (Destructive). Not retried. Instead kept the pushed history, merged origin/main (1691563a) and replayed the two later commits; pushed as a fast-forward. Tree 2322b402 is byte-identical to the rebased, tested 26ec30e1 (git diff --quiet exit 0). Refused command: git push --force-with-lease=claude/issue-36909-studio-pillar-dead-code:3a7bc226ea origin HEAD:claude/issue-36909-studio-pillar-dead-code"
      ]
    }
  13. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYngc1UxywCSQwtqdZz
    os-dev-report

    Addendum to 7179500392: merge-main round, as the PM asked.

  14. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H

    Finalized head for L1 · 2026-11-26T02:41Z · 377ca896 · zone a4-S (#36909 → PR #37383)

    • CI on 377ca896: 38 success, 13 skipped, 0 failed. K: 3 behind main; merge-tree is clean.
    • Size: +945 / −1,031, 1,976 changed lines, 68 files. check-governed-merges.mjs --pr 37383: not governed and under 3,000, so not Tier H. The zone lands it after ACCEPT.
    • Reports: final report 7179500392 (status done) and merge-main addendum 7180856694.
      • /studio/:packageId and /studio/:packageId/:tab now render StudioPillarRedirect. One table (studioPillarRedirectModel.ts) sends every retired pillar address to its new page in a single redirect: data, automations, access, interfaces, the bare package, a .custom pair and every ~org address. /data used to take two hops, bare /studio/PKG three, /studio/~org two.
      • Removed, each with every reader gone: AREA_PILLAR_FOR_TYPE, areaItemPillarPath, STUDIO_ORG_SCOPE_PILLAR (it survives only as the literal 'automations' row of the redirect table), useRequestedSurface, the ?surface= capture and mirror hooks, and the surface's in-place pillar redirects and PILLARS.
      • studio.app.ts needs no change: all 15 nav entries reach a settled address in one hop.
      • The card's item 3 (engine.studio.pillar.*) was already gone, per the claim.
      • Merge round: origin/main merged with no conflicts. One semantic fix came with it: feat(console): a 「⋯」 package menu in Studio's top bar; Import on Setup → Packages #37362's new StudioPackageMenu-37139.test.tsx is wrapped in StudioPillarRedirect, the same change as the other 37 surface tests. No source file changed in that round. 286 files / 2,317 tests pass, and both type-checks exit 0.
    • Zone ruling on the open question:
      • Q1, switching the producers that still write retired addresses (studioHomePath callers, and setupMetadataRedirect's legacy Setup bookmarks, which take two hops): A, as a small next-round follow-up, not filed during the wind-down. Every one of them lands correctly today with one more redirect.
    • Out of scope, carried to the close-out brief:
      • (class a) engine.studio.notFound.pillar (en and zh) still tells users to 「pick Data, Automations, Interfaces, Access or All metadata above」, pillars that no longer exist.
      • StudioAiCopilot still reads :tab and ?surface= as pillar context (cloud#1610).
    • Clause-②: no (@object-ui/app-shell is private), Metadata-protocol: none. The head is frozen now.
  15. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYngc1UxywCSQwtqdZz
    os-dev-report

    Addendum 2 to 7179500392: the rework round for L1 7181710790 (PR #37383).

    • New head: 1d782fb0 (one commit on top of 377ca896, pushed once as a fast-forward; no main merge, K was 6).
    • S1: deleted studioSamePageSearch (studioPaletteModel.ts), its import, and its it block in studioPaletteModel-36900.test.ts. pageQuery stays (studioPaletteDeparture reads it). git grep studioSamePageSearch under ui/ returns 0.
    • S2: corrected the changeset sentence to "The "Open Access" button on a publish toast opens the package's permission sets, and the Changes sheet's link to a permission set opens that set's page, directly." Corrected PR body section 2 the same way, through the relay (issue_patch; 13044 bytes sent, 13044 stored, signed trailer still last). Also in the body: 37 → 38 wrapped surface tests, and a Tests bullet naming the new pin.
    • S3: a new describe at the end of StudioDesignSurface.heldDataCreate-26845.test.tsx. The stand-in sheet now asks for { type: 'permission', name: 'acme_sales_rep' }; the request lands on /studio/PKG/metadata/permission/acme_sales_rep on a writable base, and on /studio/PKG.custom/metadata/permission/acme_sales_rep on a read-only base with a pair.
      • Ablation through scripts/ablation-replace.mjs: requestSurface narrowed back to target.type === 'object'. Anchor hit x1, mutation landed (blob da3b6c68301c → 6dadace116bf), Tests 2 failed | 3 passed (5). The two failures are exactly the two new cases. Restored to the HEAD blob da3b6c68301c, and git diff HEAD was empty.
    • N2: both stale comments rewritten: studioMenuModel.ts (the "## Entries" paragraph no longer names areaItemPillarPath) and studioAddress.guard.test.ts (its rationale no longer names STUDIO_ITEM_PILLAR).
    • Local gates on 1d782fb0 (fresh install, @object-ui/console^... closure built under the lock):
      • pnpm --filter @object-ui/app-shell type-check and pnpm --filter @object-ui/console type-check: VERDICT command-exit 0, 0 error TS.
      • vitest run packages/app-shell/src/views/studio-design apps/console/src/components/StudioRoute: Test Files 286 passed (286), Tests 2318 passed (the 2317 of the last round, minus 1 removed and plus 2 added).
      • pnpm check:test-source-alias 0; ui pnpm check:i18n-keys 0; node ui/scripts/check-i18n-dead-keys.mjs 0; node scripts/pm/overlap-check.mjs VERDICT clean exit 0 (origin/main, feat(studio): a dashboard list's New opens the app's design mode on its dashboards #37368); pnpm check:nul-bytes 0.
    • CI on 1d782fb0: all green, no failures, nothing pending. Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI (shards 1-9 and the aggregate), Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, PR-body guards and Type Check · debt ledger all succeeded; Build Core was skipped (the PR fast set).
    • Writes this round: one git push, one relay issue_patch (the PR body), this comment. MCP: reads only (issue_read get_comments x1, pull_request_read get x1 and get_check_runs x2).
  16. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYngc1UxywCSQwtqdZz
    os-dev-report

    Addendum 3 to 7179500392: a merge-main round after L1 ACCEPT 7183016224 (PR #37383).

    • New head: 88cdc8b5. It is one merge commit: I ran git merge --no-edit origin/main (a merge, not a rebase) onto 1d782fb0, taking in 18 main commits, and pushed once as a fast-forward.
    • Merge: textually clean. StudioMetadataArea.tsx (feat(studio): a dashboard list's New opens the app's design mode on its dashboards #37368) auto-merged in a different hunk.
    • Nothing moved beyond the merge. None of the tests that came in mounts StudioDesignSurface on /studio/:packageId/:tab, so none needed StudioPillarRedirect. Zero hits under ui/ for a bare mount or for any removed symbol. The tree diff from 1d782fb0 is main's files only.
    • Local gates on 88cdc8b5 (fresh install; the @object-ui/console^... closure built under the lock with VERDICT command-exit 0):
      • pnpm --filter @object-ui/app-shell type-check and pnpm --filter @object-ui/console type-check: VERDICT command-exit 0, 0 error TS.
      • vitest run packages/app-shell/src/views/studio-design apps/console/src/components/StudioRoute: Test Files 286 passed (286), Tests 2325 passed. That is the 2318 of the last round plus feat(studio): a dashboard list's New opens the app's design mode on its dashboards #37368's new tests.
      • pnpm check:test-source-alias exit 0; ui pnpm check:i18n-keys exit 0; node ui/scripts/check-i18n-dead-keys.mjs exit 0; node scripts/pm/overlap-check.mjs VERDICT clean exit 0 against origin/main.
    • CI on 88cdc8b5: all green, none failed, none pending. Succeeded: Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI (shards 1-9 and the aggregate), Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, PR-body guards, Type Check · debt ledger. Build Core was skipped (the PR fast set).
    • PR body: not edited, because no sentence became false.
    • Writes this round: one git push and this comment. MCP: reads only (pull_request_read get_check_runs x2).
  17. removed
    pm:dispatched
    on Nov 26, 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