Repository navigation
Todo
Labels
area:uxdomain:uiDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p1High: required for production / M2
Description
repo:objectstack@hotlong · hotlong · session_2d709547c1624199b93584a53fbaaca2
维护者速读
- 做什么:同一条记录/对象只能收藏一次,归属于收藏时所在的应用。在别的应用里看到它时,星标显示为已收藏,点开提示「已收藏于 X」,可选「在 X 中打开」或「取消收藏」,而不是看起来没收藏、或者再收藏一份。
- 约 1.5 人日,p1。必须先于按应用过滤的侧栏(Sidebar favorites: each business app lists only its own; the workbench sidebar aggregates every app's, compact, under its menu #39946)落地,否则过滤后会出现"星是亮的、侧栏里却找不到"。
- 维护者 2026-12-06 在会话中经效果图和 Fable 评审后确认(方案乙;「可以,立卡」)。
Parent: #39871
Why
- Favorite ids carry no app:
record:${objectName}:${recordId}(ui/packages/app-shell/src/context/FavoritesProvider.tsx:245),object:NAME(ui/packages/app-shell/src/layout/SidebarItemMenu.tsx:267-270). The app lives only in the storedhref(/apps/<segment>/…). toggleFavoritechecks existence by id alone (FavoritesProvider.tsx:513-520), so the same record starred in CRM shows a lit star in every app that opens it.- Once each business app's sidebar lists only its own favorites (Sidebar favorites: each business app lists only its own; the workbench sidebar aggregates every app's, compact, under its menu #39946), that lit star in app Y points at nothing in Y's sidebar.
What to build
- Owning app. A content favorite belongs to the app its
hrefnames (favoriteAppSegment,ui/packages/app-shell/src/layout/listViewFavorites.ts:35, resolved the way the router resolves it). No id change, no migration: one favorite per item stays the rule. - Star states on every star surface (record header
ui/packages/app-shell/src/views/RecordDetailView.tsx:846, sidebar ⋯ menuSidebarItemMenu.tsx:268, list-view switcherviews/objectViewSwitcherMenu.tsx:163,layout/listViewFavorites.ts:125):- not starred → empty star, click stars it in the current app;
- starred in this app → lit star, click un-stars;
- starred in another app X → lit star; click opens a small popover 「已收藏于 X」 with 「在 X 中打开」 (the stored href) and 「取消收藏」. It never creates a second favorite and never silently moves it. In a menu, the entry reads 「已收藏于 X」 with the same two choices as a submenu.
- Unowned favorites. Conversations (
/ai…href) and any favorite whose app no longer resolves count as owned by no app: their star behaves as "starred here" everywhere. - One helper (e.g.
favoriteOwner(item, apps)) used by these surfaces and by Sidebar favorites: each business app lists only its own; the workbench sidebar aggregates every app's, compact, under its menu #39946's filter, so the two cannot disagree.
Acceptance
- Star a record in app X, open it in app Y: lit star, popover 「已收藏于 X」; 在 X 中打开 lands in X; 取消收藏 removes it everywhere.
- Starring never yields two entries for one id.
- zh-Hans and en strings; tests for the three states and the unowned case.
Metadata
Metadata
Assignees
Labels
area:uxdomain:uiDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p1High: required for production / M2
Activity
objectstack-fleet commentedon Dec 6, 2026
triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:ux · domain:ui · Feature · p1 (as filed, confirmed by the maintainer) · pm:queue, touched 2026-12-06T16:12Z. Attached under the workbench epic #39871. It goes first in the favorites set: #39946 and #39947 wait on it.
objectstack-fleet commentedon Dec 6, 2026
repo:objectstack@os-steve · os-steve · session_01ADHkmQ51Pup8oM5qeWWPW3
Claim: PM loop round 1
Session:
session_01ADHkmQ51Pup8oM5qeWWPW3Account:
os-steveBranch:
claude/issue-39945-favorite-owning-appWorktree:
objectstack-issue-39945Domain:
domain:uiSeat:
repo:objectstack@os-steveArea: ost-P (zone of this seat, p1 of every area)
File surface:
ui/packages/app-shell/src/context/FavoritesProvider.tsx,ui/packages/app-shell/src/layout/SidebarItemMenu.tsx,ui/packages/app-shell/src/views/RecordDetailView.tsx,ui/packages/app-shell/src/views/objectViewSwitcherMenu.tsx,ui/packages/app-shell/src/layout/listViewFavorites.ts,ui/packages/app-shell/src/layout/favoriteOwner.ts(new helper),ui/packages/i18n/src/locales/(reason: the 「已收藏于 X」 / 在 X 中打开 / 取消收藏 strings, every locale file)Container & model:
M,mode:subagent,model: default (dispatch-gates --tier: "no path-derived mandate … floor sonnet · default opus · ceiling fable"),effort: highClause-②: yes
Metadata-protocol: none
Responsibility: n/a — not a defect card
Thread-read: 7460529765
Premise: holds (re-read at main 54f3450: the record favorite id is
record:${objectName}:${recordId}at FavoritesProvider.tsx:245 with the app only inhref;toggleFavoritetests existence byf.id === item.idalone at :513-520;favoriteAppSegment(href)exists at listViewFavorites.ts:35)Pre-claim lane:
domain:ui— every path is underui/packages/**Pre-claim deps: none named; #39946 and #39947 wait on this card (triage 7460529765), not the reverse
Prior rulings read: card text records the maintainer's choice (方案乙,「可以,立卡」, 2026-12-06); check-prior-rulings keyword scan 168 hits, none rules favorite ownership across apps; pin tests: FavoritesProvider / listViewFavorites tests beside the files
Serial constraints cleared:
check-handover --inflightmeets #39941, #39873, #39878 (zone ost-W, same seat) on the locale files only; no single-claim path; whichever PR lands second merges main and resolves. No in-flight claim names the favorites files.Resume-from: none
objectstack-fleet commentedon Dec 6, 2026
repo:objectstack@os-steve · os-steve · session_01ADHkmQ51Pup8oM5qeWWPW3
os-dev-report
{ "issue": 39945, "status": "blocked", "branch": "claude/issue-39945-favorite-owning-app", "pr": "https://github.com/objectstack-ai/objectstack/pull/39983", "session": "session_01ADHkmQ51Pup8oM5qeWWPW3", "premise_still_valid": true, "summary": "Premise holds at main 54f3450e (record id record:OBJECT:ID with the app only in href; toggleFavorite tests by id alone; favoriteAppSegment in listViewFavorites.ts). The router resolves /apps/:appName/* with matchAppBySegment(useMetadata().apps, appName) over the unfiltered app list (console/AppContent.tsx, matchedApp); the new layout/favoriteOwner.ts reads exactly that: favoriteOwner, favoriteStarState (none/here/elsewhere; unowned = /ai, off-console, unresolvable app, nav pin, reads here everywhere) and useFavoriteElsewhere. Delivered on draft PR 39983 at 5830bac6: the list-view switcher star end to end (lit, popover Starred in X / Open in X / Remove, toggle refused for an elsewhere view), FavoriteMenuItem submenu, useObjectListFavorite.elsewhere, SidebarItemMenu favoriteElsewhere prop, strings in all 11 packs. BLOCKED on a file-surface extension, stopped per the dispatch: (1) the record header star is RecordTitleChip in @object-ui/components, fed by RecordContext in @object-ui/react through page:header in components/src/renderers/layout/containers.tsx, and it only knows a boolean plus a toggle, so the popover needs one optional field carried through those three files (plugin-detail DetailView.tsx also passes onToggleFavorite and may need it), then RecordDetailView.tsx hands it useFavoriteElsewhere(appName)(favoriteRecord.id); (2) the hosts of the menu entry: views/objectViewPageHeader.tsx (one prop, elsewhere={listFavorite.elsewhere}) and layout/UnifiedSidebar.tsx (favoriteElsewhere for the Favorites-section rows). FavoritesProvider.tsx needed no change. PR body therefore says Part of #39945, not the dispatched Fixes line, until those land in the same PR.", "tests": "At HEAD 5830bac6. New: ui/packages/app-shell/src/layout/__tests__/favoriteOwner.test.ts (unit) + favoriteOwner.surfaces-39945.test.tsx (dom): 'Test Files 2 passed (2) / Tests 15 passed (15)'. Ablation: favoriteStarState forced to answer here => 'Tests 5 failed | 10 passed (15)' (every elsewhere case), file restored with git checkout HEAD. Neighbours: pnpm --dir ui exec vitest run packages/i18n/ packages/app-shell/src/layout/__tests__/ + objectViewTitleSwitcher, phoneWidth-29074, inPlaceViewCreate-35553, ObjectView.titleViewSwitcher-27594, CommandPalette.previewCreate-36286 => 'Test Files 304 passed (304) / Tests 3702 passed | 13 skipped'. turbo run type-check --filter=@object-ui/app-shell --filter=@object-ui/i18n (src + test programs) => 'Tasks: 75 successful, 75 total'. pnpm --dir ui exec vitest run scripts/ => '172 passed | 2 skipped'. check:i18n-drift exit 0 (3 keys added, 0 en values changed). check:new-line-citations exit 0 (0 new).", "gates": "Local, HEAD 5830bac6: dispatch-gates --commands derived 41; all 41 run, each exit 0 captured before any pipe; --ran reconciliation 'Run reconciliation — 41 derived, 41 run, 0 NOT-MEASURED, 0 UNRUN' (a derived zero, every line carries its exit). overlap-check exit 0 ('VERDICT clean': origin/main and PRs 39982, 39973, 39962, 39956, 39955 merge cleanly; they share the locale files only). CI on 5830bac6 at report time: Lint & Repo Gates success, TypeScript Type Check success, Type Check UI success, Lint UI success, Build & E2E UI success, Live E2E UI success, Test Core success, Governed Surface Queue Guard success, Dogfood Regression Gate success, Check Changeset success, PR-body guards success; Test UI shards 2, 8, 11, 12, 13, 15 of 16 in_progress (others success): in_progress, not read as a pass. Build Core and Temporal Conformance skipped by the selector.", "line_budget": "685 changed lines (+649 / -36, 18 files) vs the 3000 human-merge threshold: under", "files_changed": [".changeset/39945-favorite-owning-app.md", "ui/packages/app-shell/src/layout/favoriteOwner.ts", "ui/packages/app-shell/src/layout/listViewFavorites.ts", "ui/packages/app-shell/src/layout/SidebarItemMenu.tsx", "ui/packages/app-shell/src/views/objectViewSwitcherMenu.tsx", "ui/packages/app-shell/src/layout/__tests__/favoriteOwner.test.ts", "ui/packages/app-shell/src/layout/__tests__/favoriteOwner.surfaces-39945.test.tsx", "ui/packages/i18n/src/locales/(ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans, zh-Hant).ts"], "deviations": ["PR body leads with Part of #39945 instead of the dispatched Fixes #39945: the record header and two hosts are not in the PR, and merging it must not close the card.", "No ## Screenshots: no browser could be driven from this container; the popover and submenu are pinned by dom tests.", "The local gate loop ran past the 10-minute foreground cap and the harness moved it to the background on its own; it was waited on in-turn and all 41 exits read before the report.", "Built the @objectstack closure of app-shell (47 packages, turbo --concurrency=2) to run ui tests and type-check locally; nothing committed from it."], "mcp_calls": "0", "api_writes": "2 — fleet-write relay pr_create (objectstack-ai/objectstack, POST /pulls draft, run 47690965267, 6778 bytes stored identical); this os-dev-report comment via post-stamped.mjs (POST /issues/39945/comments). git push x4 not counted (not REST).", "classifier_refusals": [], "open_questions": [], "security_findings": "none", "out_of_scope_findings": ["carrier: 39945 (this card, next round) · noted, not filed — chrome/PaletteCurrentPage.tsx (the command palette Current page favorite row, not listed on the card) still toggles by id: in app Y it reads Remove from favorites for a record starred in X; not a second favorite and not a move, but not the three-state reading.", "carrier: 39945 (this card, next round) · noted, not filed — the record print page's sys_favorite action entry in RecordDetailView goes through the action menu, which has no submenu shape.", "carrier: maintainer via seat · noted — the ruling says owner = app the stored href names; a conversation starred on an app's AI page carries /apps/APP/... and is owned by that app under this rule, only /ai... conversations are unowned. Flag if every conversation was meant to be unowned (affects 39946's filter)."] }objectstack-fleet commentedon Dec 6, 2026
repo:objectstack@os-steve · os-steve · session_01ADHkmQ51Pup8oM5qeWWPW3
Claim amendment (zone ost-P, same claim 7462581697, same branch
claude/issue-39945-favorite-owning-app, draft PR #39983)Reason: the dev's report 7463626157 measured that the record header star is
RecordTitleChipin@object-ui/components, fed byRecordContextin@object-ui/reactthroughpage:headerincontainers.tsx; it carries only a boolean and a toggle, so the 「已收藏于 X」 popover needs one optional field through those files. Two menu hosts also need wiring.Added to File surface:
ui/packages/components/src/custom/RecordTitleChip.tsx,ui/packages/react/src/context/RecordContext.tsx,ui/packages/components/src/renderers/layout/containers.tsx,ui/packages/plugin-detail/src/DetailView.tsx,ui/packages/app-shell/src/views/objectViewPageHeader.tsx,ui/packages/app-shell/src/layout/UnifiedSidebar.tsx(the Favorites rows passfavoriteElsewhere),ui/packages/app-shell/src/chrome/PaletteCurrentPage.tsx(the palette's current-page favorite row, same three-state reading).check-handover --inflight on the added paths:
UnifiedSidebar.tsxmeets #39948 (this zone, same seat) and #39901 (repo:cloud@hotlong); no single-claim path. Notify: serial — whichever PR lands second merges main and resolves. Other added paths clear.