Skip to content

Studio 重构(1-3):去掉顶部分区,换成可折叠的左侧分组菜单(数据、界面、自动化、平台、访问、AI),右侧是列表和全屏详情 #36899

Description

@os-support-ai

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

③ topic child · Source: topic #36890. Maintainer: 「顶部的导航也不需要了」; 06:31Z 「我们说的弹出窗口全屏,应该是右侧全屏对吧,左侧菜单和前端一样可以折叠。」; decisions 5, 11. Part of #36890.

今天(读代码确认,主干 0819cab)

  • 顶部导航:SDS:565-570 PILLARS、:578-582 METADATA_AREA_TAB、:1686-1720 <nav data-testid="studio-pillar-nav">。
  • 外壳必须保留:保存协调器(SDS:858)、未保存拦截(:848-881)、右侧槽和副驾驶停靠、变更面板和发布(:2043-2058)、可写门和配对包(:704, 823-831)、包不存在空状态(:1894-1905)。
  • 两个外框:~all 不走 SDS,走 StudioConsoleFrame(ui/apps/console/src/components/StudioRoute.tsx:254-260)。
  • ~org 今天是 AutomationsPillar 以 packageId=null 渲染(SDS:1882-1894);元数据区不认识 ~org,areaLocationRedirect 会把它当包名(SD/metadataArea.ts:176-196)。
  • 组织级默认共享总览在 AccessPillar 里(SDS:10589, 11357),用 ?surface=owd:overview,不是元数据项。
  • 分组数据:MA/DirectoryPage.tsx:73-83, 199-239 已按服务端下发的域分组并带数量。
  • 应用侧栏折叠:@object-ui/components 的 ui/sidebar.tsx(SidebarProvider),状态存 cookie(lib/sidebar-cookie.ts)。
  • 窄宽度:顶部导航 sm 以下换行、1024 以下只显示图标(SDS:1668-1672, 1713-1720)。

要做的

  1. 去掉顶部分区导航;左侧菜单按 0-1 的对照表分六组(决定 11),带数量和搜索;复用 DirectoryPage 的分组数据。
  2. 菜单可折叠,复用应用侧栏的折叠组件和行为;Studio 用自己的 cookie 键(不和应用侧栏共用),PR 里写明。手机和窄宽度下是抽屉。
  3. 两个外框都出现同一个菜单,或把 ~all 并进同一个外壳(开发者定,PR 写明)。
  4. 新增 ~org 一条腿(组织级流程,在「自动化」组);组织级默认共享总览、诊断按决定 11 放进菜单,总览的路由归 3-3。
  5. 左上角「‹ 返回应用」不变,显示当前包的应用名(决定 5;今天 SD/StudioBackToApp.tsx:66 显示的是记住的应用)。
  6. 顶栏去掉导航后,「变更」「发布」(只为 AI 草稿出现)的摆法一并定下(Studio 对象页页签顺序(业务在前、技术在后)和顶部导航的排法(去掉「界面」后的四个分区):顶部导航先出图再做 #36513 没答完的问题)。
  7. 过渡期(本卡合并后、3-x 合并前)点对象、流程、权限集仍进分区页:分区页上也要有左侧菜单,不能出现两种外壳来回切。
  8. 文案:engine.studio.pillar.*(ui/packages/i18n/src/namespaces/studio/en.ts:3493-3498)换成分组名,en 和 zh;分组名用 translateMetadataDomain。
  9. 无障碍:菜单 aria-current、焦点顺序;Studio 入口权限门(ui/apps/console/src/components/studioEntry.ts、StudioRoute.tsx:150-163)对新菜单照旧生效,有测试钉住。

不做的

  • 不去掉 Studio 首页(单独一张卡);不动三个设计器内部(3-1、3-2、3-3)。

验收

  • 自建应用和 HotCRM 上,Studio 没有顶部分区,左侧六组菜单可折叠、刷新后保持;手机宽度是抽屉。
  • 断言 studio-pillar-nav 的测试(约 10 个文件)改为断言新菜单;分区路由在过渡期保留,其余写了分区地址的测试不需要动。
  • 浏览器走查截图(宽、窄、折叠)放进 PR。

Blocked-by: #36893
Blocked-by: #36891

Grading: area:ux · Feature · Studio shell and navigation · builders, every Studio session · evidence: read from code. Topic child ⇒ p2 (blocker rule may raise it if a p1 card lists it).
Dedupe: covered by #36890 (studio pillar nav, studio 左侧菜单); #36513's top-nav half is superseded by this card.
Reader: seat repo:objectstack#3, one os-dev card. Size L. Metadata-protocol: none. Wave 2 (critical path).

Activity

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

    @objectstack-fleet
    Contributor

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

    Dispatch note for this card's dev (from #36891 / PR #36921 and its contract review 7127449959; seat route 2026-11-24 09:21Z)

    1. Group names. Decision 11 (and amended ADR-0084) name the groups 平台 for system and 访问 for security. Today's domain dictionary (DOMAIN_LABELS_ZH / DOMAIN_LABELS_EN in ui/packages/app-shell/src/views/metadata-admin/i18n.ts, read by translateMetadataDomain) draws them as 系统 / System and 安全 / Security. Item 8 below says the group names come from translateMetadataDomain. So the dev maps 平台 → system and 访问 → security in the menu, or changes those two labels, and says which in the PR.
    2. Decision 5 gap. Decision 5 does not say what the top-left control names when the current package publishes no app. The conservative reading is the package's own label. The dev states it in the PR as a deviation for the reviewer, unless a ruling lands first.
  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

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

    Maintainer ruling for this card · 2026-11-24T09:37Z

    Decision 5, the gap the #36921 contract review raised (7127449959): when the current package publishes no app, Studio's top-left shows the package's own label, and "‹ back" goes to the apps home (/apps). The package-less (org-level) entry is treated the same way. The maintainer chose this on a decision card on 2026-11-24T09:37Z (option A: 「显示包名,返回到应用首页」). It replaces the seat's earlier "stated deviation" route in 7127465963; the group-name mapping in that note still stands.

  4. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

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

    Claim: PM loop round 1
    Session: session_01WGufziBCAytAzzCu3iPBFR
    Account: os-support-ai
    Branch: claude/issue-36899-studio-left-menu
    Worktree: objectstack-issue-36899
    Domain: domain:ui
    Seat: repo:objectstack#3
    Area: ux-E
    File surface: the Studio shell in ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx (nav + header region only, not the pillar modules' insides), StudioBackToApp.tsx, metadataArea.ts (~org leg), new files for the left menu, ui/apps/console/src/components/StudioRoute.tsx / StudioConsoleFrame / studioEntry.ts (the ~all frame and the entry gate test), the sidebar-collapse reuse from @object-ui/components (read; a new cookie key), ui/packages/i18n/src/namespaces/studio/** and metadata-admin/i18n.ts (group labels), the ~10 tests asserting studio-pillar-nav, e2e specs for the menu, and a changeset. ⛔ Not the designers' internals (#36903 / #36904 / #36905) and not the Studio home (#36908) (stop on breach; explain in the report)
    Container & model: L, mode:subagent, model: default — dispatch-gates.mjs --tier: "Model tier — no path-derived mandate", effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 7127681255
    Premise: holds, line numbers moved (read on origin/main 6902acb after #36956: SDS is 1,715 lines; PILLARS :216, METADATA_AREA_TAB :228, <nav data-testid="studio-pillar-nav"> :1310; engine.studio.pillar.* at ui/packages/i18n/src/namespaces/studio/en.ts:3496-3498; 8 files reference studio-pillar-nav)
    Pre-claim lane: repo:objectstack seat 3 area ux-E (epic #36890, critical path; L children pre-cleared by the seat 2026-11-24 08:22Z); every path under ui/**, domain:ui, area:ux
    Pre-claim deps: Blocked-by: #36893 merged (PR #36956, 6902acb, 12:21Z); Blocked-by: #36891 merged (PR #36921, 56d723f) ⇒ pm:blocked removed
    Prior rulings read: the card thread's two notes, 7127465963 (group-name mapping 平台 → system, 访问 → security) and the maintainer ruling 7127681255 (decision 5: no published app ⇒ top-left shows the package's own label, ‹ back goes to /apps; the org-level entry the same); check-prior-rulings --paths SDS / StudioBackToApp / StudioRoute: 5 surface hit lines (code comments on the entry gate and the save coordinator that this card keeps); tree 28 hits, none on top nav vs left menu. Governing: ADR-0084 and ADR-0146 D1 as amended by PR #36921; #36890 decisions 5, 11
    Serial constraints cleared: the cap of two SDS writers applied until #36893 landed, and it has now landed. Open PRs on SDS: #36973 (#36895, ux-A, the address helper, also StudioRoute.tsx + metadataArea.ts) and #36958 (#36726, os-alice). The dev runs overlap-check before every push; whichever PR lands second merges main. same-day churn: 6902acb, 5c2d5cf, 3f568c1, f115a66
    Size: L. If the card's total across its PRs would pass 3,000 lines, the dev stops and reports before passing it.

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

    @objectstack-fleet
    Contributor

    repo:objectstack#3 · os-support-ai · session_01WGufziBCAytAzzCu3iPBFR
    os-dev-report

    {
     "issue": 36899,
     "status": "done",
     "branch": "claude/issue-36899-studio-left-menu",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/36985",
     "pr_numbers": [
      36985
     ],
     "remote_branch": "origin/claude/issue-36899-studio-left-menu",
     "head_sha": "214400bd3582771756fcf0fb56d1444b8f872ff9",
     "session": "session_01WGufziBCAytAzzCu3iPBFR",
     "Dev-effort": "high",
     "Rounds": 1,
     "premise_still_valid": true,
     "summary": "Studio's top pillar switcher is replaced by a collapsible left menu of six domain groups (Data, UI, Automation, Platform, Access, AI; zh 数据/界面/自动化/平台/访问/AI) on every Studio page, built on the app sidebar primitive with its own cookie studio_menu_state and a drawer below 768 px. The menu lists the package's types by the directory's own rule (shared helper scopeDirectoryEntries), with group type counts, item counts and search; type entries open the area list, items still open the pillars; Organization flows (Automation), Default sharing (Access, the OWD overview route), Diagnostics (Platform) and Positions and permissions (Access, ~all) are the four non-type entries. ~all is merged into the builder's shell (one menu everywhere), areaLocationRedirect no longer reads ~org as a package, and Back to app follows decision 5 and the maintainer ruling. Pillar routes, save coordinator, unsaved guard (menu links ask once; the Default sharing re-entry asks then remounts the Access pillar), right slot and copilot dock, changes panel and publish, writable gate and package-missing state are kept.",
     "choices": {
      "group_name_mapping": "changed the two dictionary labels: translateMetadataDomain system = Platform/平台, security = Access/访问 (all readers are Studio surfaces now)",
      "all_frame": "merged ~all into StudioDesignSurface: /studio/~all/metadata/* is served by the :packageId/metadata/* builder route with no package; StudioConsoleFrame now frames only the landing",
      "cookie_key": "studio_menu_state (SidebarProvider gains optional cookieName prop; sidebar_state untouched)",
      "changes_publish": "stay at the top bar's right end beside Cancel/Save, drawn while drafts are pending (unchanged)",
      "address_builder": "#36973 not merged at PR open (REST read: draft, open, dirty): menu links use the existing helpers; whichever of #36973 and #36985 lands second routes them through studioAddress. No STUDIO_ITEM_PILLAR row and no scope-segment encoding changed (PM note acknowledged)."
     },
     "overlap_check": "final head 214400bd3 vs origin/main 57445a6998: merges cleanly. #36973 conflicts in StudioDesignSurface.tsx and metadataArea.ts; #36958 conflicts in StudioDesignSurface.tsx; #36784 conflicts in StudioDesignSurface.tsx; #36983 and #36977 (studio i18n en/zh) merge cleanly. All conflicts sit in the header/nav region this card replaces; their code was not reshaped. VERDICT overlap exit 1 (the conflicts above).",
     "tests": "At 214400bd3: vitest on 50 touched+related files (touched tests, every test naming translateMetadataDomain or a security/system domain, DirectoryPage, StudioRoute*, StudioBackToApp, packageLessFlows, sidebar-cookie-restore) -> Test Files 50 passed (50), Tests 450 passed (450), lock VERDICT command-exit 0. pnpm --dir ui exec vitest run scripts/ at b9018320e (shadcn-local-patches script edited) -> Test Files 172 passed | 2 skipped (174), Tests 5130 passed | 2 skipped, VERDICT command-exit 0. playwright test e2e/studio-left-menu-36899.spec.ts --project chromium -> 3 passed (first two runs were red on my own selector and an in-flight slide-in; fixed in the spec). First full vitest run was red on 4 cases (packageLessFlows-11553 still read the pillar link; StudioMenu search expectation missed Organization flows; the Default sharing re-entry remounted before the router held the new query) - all fixed, the third by deferring the remount to a layout effect on location.search. No ablation: new behaviour, pins written red-first in the conversion runs. Dogfood: real console dev server against the showcase server (self-built app com.default.field-service created via the landing's New app, plus com.example.showcase) and HotCRM main on its published 18.6.0 server: no studio-pillar-nav; six groups; Object current on Data; collapse -> data-state=collapsed, cookie studio_menu_state=false and no sidebar_state, still collapsed after reload; 390 px -> no docked menu, toggle opens a 288 px drawer at x=0. Screenshots (wide/collapsed/narrow, both apps) embedded as images in the PR body.",
     "gates": "Local: type-check of @object-ui/components, @object-ui/i18n, @object-ui/app-shell, @object-ui/console and ui type-check:e2e -> VERDICT command-exit 0 (e2e re-run at head). Derived families (dispatch-gates.mjs --commands, 18 commands): check-adr-0087-registration (+self-test), check-changeset-no-major, check-closing-keyword-parity (+self-test), check-comment-mask-corpus, check-empty-changeset (+self-test), check-sdui-manifest (+self-test), snapshot-next --self-test, check-governed-queue-guard --self-test, release-rehearsal-clone --self-test, release-pending-publish --self-test, check:adr-anchors, check:changeset-gate-self-tests, ui vitest scripts/ -> every exit 0 (exit captured before pipes). Also check:i18n-keys 0, check:i18n-drift 0, check:i18n-dead-keys 0, check:new-line-citations 0, check-nul-bytes 0, check-platform-checklist --changed-from origin/main 0. --ran reconciliation not run as a separate step (list matched by hand against the derivation). NOT MEASURED: root pnpm check:i18n and check:i18n-coverage, reason: exit 3 PREREQUISITE NOT MET (root app bundles' dist absent; not derived for this diff, CI owns). CI at report time: 20 check-runs on 214400bd3, 17 in_progress, 3 skipped (schedule gate, packed-tarball smoke, 18.x harness, queue verdicts); PR mergeable_state blocked (not dirty).",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "line_budget": "2295 changed lines across all PRs of this card (+1705 / -590, 36 files, generated none) vs Tier H 3000: under",
     "files_changed": [
      ".changeset/36899-studio-left-menu.md",
      "ui/apps/console/src/components/StudioRoute.metadataArea-28561.test.tsx",
      "ui/apps/console/src/components/StudioRoute.recentPackage-11863.test.tsx",
      "ui/apps/console/src/components/StudioRoute.tsx",
      "ui/e2e/studio-left-menu-36899.spec.ts",
      "ui/packages/app-shell/src/views/metadata-admin/DirectoryPage.tsx",
      "ui/packages/app-shell/src/views/metadata-admin/PageShell.narrowHeader-12306.test.tsx",
      "ui/packages/app-shell/src/views/metadata-admin/directoryScope.ts",
      "ui/packages/app-shell/src/views/metadata-admin/i18n.ts",
      "ui/packages/app-shell/src/views/metadata-admin/studio-locale.i18n.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioBackToApp.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.accessSegment-12452.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.backToApp-36501.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.heldDataLeave-26705.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.heldFlowLeave-26705.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.interfacesRetired-36502.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.metadataArea-28561.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.narrowHeader-12509.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.notFound-26708.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.packageLessFlows-11553.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.pillarNavGuard.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioMenu.test.tsx",
      "ui/packages/app-shell/src/views/studio-design/StudioMenu.tsx",
      "ui/packages/app-shell/src/views/studio-design/metadataArea.test.ts",
      "ui/packages/app-shell/src/views/studio-design/metadataArea.ts",
      "ui/packages/app-shell/src/views/studio-design/studio-tokens.ts",
      "ui/packages/app-shell/src/views/studio-design/studioMenuModel.test.ts",
      "ui/packages/app-shell/src/views/studio-design/studioMenuModel.ts",
      "ui/packages/app-shell/src/views/studio-design/studioZhPillarNames-11801.test.ts",
      "ui/packages/components/src/__tests__/sidebar-cookie-restore.test.tsx",
      "ui/packages/components/src/ui/sidebar.tsx",
      "ui/packages/i18n/src/namespaces/studio/en.ts",
      "ui/packages/i18n/src/namespaces/studio/zh.ts",
      "ui/scripts/__tests__/shadcn-local-patches.test.ts",
      "ui/scripts/shadcn-local-patches.mjs"
     ],
     "deviations": [
      "Edited @object-ui/components sidebar.tsx (surface said read): SidebarProvider hard-codes sidebar_state on every write incl. Cmd+B, so a second cookie needed an optional cookieName prop; declared as a shadcn local-patch family with its pin in ui/scripts/shadcn-local-patches.mjs.",
      "Edited metadata-admin DirectoryPage.tsx and added directoryScope.ts outside the stated surface: the directory's listing rule became one helper the menu shares (item 1).",
      "Apps home: the console has no /apps index route, so back-to-apps-home goes to useHomePath() (the /home launcher in Studio).",
      "~all lost the console AppHeader frame (and its Cmd+K palette) by moving into the builder shell; Cmd+K in Studio is #36900's.",
      "Screenshots are hosted on a separate orphan branch claude/issue-36899-screenshots (commit ecb115a7a, six PNGs, no code) and embedded by raw URL in the PR body; delete the branch after merge.",
      "HotCRM dogfood ran this branch's console dev server against HotCRM main on its published 18.6.0 server (a scratch clone, not the shared checkout); the Data rail's 'Couldn't read customizations' strip there is version skew, not this change.",
      "PR opened with no labels: the dispatch named none and a changeset is present (no skip-changeset)."
     ],
     "mcp_calls": "0",
     "api_writes": "2 — fleet-write relay pr_create (POST pulls, draft, + POST issues/36985/assignees os-support-ai) run 45405434800; post-stamped os-dev-report comment on #36899. git pushes (not REST): claude/issue-36899-studio-left-menu x6, claude/issue-36899-screenshots x1.",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: #36905 · the Default sharing entry links the Access pillar's existing ?surface=owd:overview; the OWD overview page itself is #36905's",
      "carrier: #36895 · menu links go through studioAddress once #36973 lands (whichever lands second merges main)"
     ]
    }

    Generated by Claude Code

  7. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

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

    Claim amendment (per L1-b (3) S2, comment 7134737804, on PR #36985 at 1f7534d):
    Clause-②: yes (widening) (was no)
    Why: @object-ui/components is published, and its exported SidebarProvider gains an optional cookieName prop (the menu's own studio_menu_state cookie). That widens a published package's public surface (precedent .changeset/36011-restore-factory-view.md, #36846). Metadata-protocol: none is unchanged; the changeset stays patch. A TIER_DEFAULT contract review is owed on the new head; L1-b (3) runs it. Everything else in claim 7131416552 stands.

  8. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

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

    Close-out: PR #36985 merged as a68b475 (2026-11-24 17:27Z) and closed this card. pm:dispatched removed. Open nits from the landing record (7138646285) for seat 4's follow-on cards: N1 ⌘/Ctrl+B toggles the Studio menu everywhere in Studio (designer rich-text ⌘B must watch for it); N3 ⌘K on ~all returns with #36900; N4 the menu says Platform / Access while the Studio directory's domain headings and chips still say System / Security (the seat's menu-only ruling).

  9. removed
    pm:dispatched
    on Nov 24, 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:uienhancementpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions