|
|
@@ -0,0 +1,475 @@
|
|
|
+# λ-Scientist P0-C Global Inbox Implementation Plan
|
|
|
+
|
|
|
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development or superpowers:executing-plans. This plan is mostly coupled UI/state work; inline execution is reasonable, with one independent review at the end.
|
|
|
+
|
|
|
+**Goal:** 把当前项目的 Research Inbox 扩展为跨项目全局 Inbox,显示项目名称,并能从待处理项直接切换项目并打开对应会话。
|
|
|
+
|
|
|
+**Architecture:** 将 `buildProjectInbox` 泛化为 `buildInbox`:一次扫描所有非归档聊天,建立 `thread_id → projectID` 映射,任务索引仍通过该映射归属项目。`PaasChat` 接收项目列表和项目切换回调,按项目读取已读状态;点击跨项目条目时先激活会话,再切换项目,避免项目切换 effect 覆盖目标会话。
|
|
|
+
|
|
|
+**Tech Stack:** SolidJS、TypeScript、Bun test、Playwright、现有项目状态与 Inbox 模块。
|
|
|
+
|
|
|
+**Spec:** `PAAS_PRODUCT_BRAINSTORM.zh-CN.md`
|
|
|
+
|
|
|
+## Global Constraints
|
|
|
+
|
|
|
+- Inbox v1 的“待确认/失败/完成未读”语义不变。
|
|
|
+- 待确认和失败永不因已读消失;只有完成未读会消失。
|
|
|
+- 已读状态仍按 scope + window + project 隔离。
|
|
|
+- 归档会话不进入 Inbox。
|
|
|
+- 任务索引只有能映射到某个项目线程时才纳入;未归属任务不进入 v1。
|
|
|
+- 跨项目点击必须先激活目标会话,再切换 active project,最后导航到会话页。
|
|
|
+- 不修改产品协议、后端接口或管理员后台。
|
|
|
+- 不使用 emoji;测试从包目录运行;每个 Task 独立提交。
|
|
|
+
|
|
|
+## Scope
|
|
|
+
|
|
|
+本计划包含:
|
|
|
+
|
|
|
+- 全局 Inbox 聚合与项目名称。
|
|
|
+- 每个项目独立的已读状态。
|
|
|
+- 跨项目条目点击、项目切换、会话激活。
|
|
|
+- 全局计数和面板项目标签。
|
|
|
+- 单元测试、浏览器测试和 README。
|
|
|
+
|
|
|
+不包含:
|
|
|
+
|
|
|
+- 未归属平台任务、任务中心全局合并。
|
|
|
+- 跨设备已读。
|
|
|
+- `needs_clarification` 映射。
|
|
|
+- Run Inspector、成果资产库和团队共享。
|
|
|
+
|
|
|
+## File Structure
|
|
|
+
|
|
|
+| 文件 | 责任 |
|
|
|
+| --- | --- |
|
|
|
+| `packages/app/src/pages/paas/inbox.ts` | 全局聚合、项目名称、任务线程映射、已读解析 |
|
|
|
+| `packages/app/src/pages/paas/inbox.test.ts` | 多项目、归档、任务映射和已读测试 |
|
|
|
+| `packages/app/src/pages/paas/chat.tsx` | 项目列表/切换回调、全局 seen、跨项目打开 |
|
|
|
+| `packages/app/src/pages/paas/index.tsx` | 传入项目列表与 active project 切换 |
|
|
|
+| `packages/app/src/pages/paas/inbox-panel.tsx` | 条目显示项目名称 |
|
|
|
+| `packages/app/src/pages/paas/studio.css` | 项目标签样式 |
|
|
|
+| `packages/app/e2e/paas/global-inbox.spec.ts` | 跨项目计数、切换和打开会话 |
|
|
|
+| `packages/app/src/pages/paas/README.md` | P0-C 行为和边界 |
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+### Task 1: 全局 Inbox 聚合模型
|
|
|
+
|
|
|
+**Files:**
|
|
|
+- Modify: `packages/app/src/pages/paas/inbox.ts`
|
|
|
+- Modify: `packages/app/src/pages/paas/inbox.test.ts`
|
|
|
+
|
|
|
+**Interfaces:**
|
|
|
+- Consumes: 全部聊天、任务索引、项目列表、每项目已读集合
|
|
|
+- Produces:
|
|
|
+ - `type InboxProject = { id: string; name: string }`
|
|
|
+ - `InboxItem.projectName: string`
|
|
|
+ - `buildInbox(input): InboxItem[]`
|
|
|
+
|
|
|
+- [ ] **Step 1: 写失败测试**
|
|
|
+
|
|
|
+在 `inbox.test.ts` 增加:
|
|
|
+
|
|
|
+```ts
|
|
|
+test("global inbox includes multiple projects with project names", () => {
|
|
|
+ const items = buildInbox({
|
|
|
+ projects: [
|
|
|
+ { id: "p1", name: "光学" },
|
|
|
+ { id: "p2", name: "数据分析" },
|
|
|
+ ],
|
|
|
+ seen: new Map(),
|
|
|
+ chats: [
|
|
|
+ chat("a", "p1", [{ id: "m1", role: "assistant", runID: "run-a", status: "failed", text: "" }]),
|
|
|
+ chat("b", "p2", [{ id: "m2", role: "assistant", runID: "run-b", status: "waiting_human", text: "" }]),
|
|
|
+ chat("c", "p3", [{ id: "m3", role: "assistant", runID: "run-c", status: "failed", text: "" }]),
|
|
|
+ ],
|
|
|
+ tasks: [],
|
|
|
+ })
|
|
|
+ expect(items.map((item) => [item.projectID, item.projectName, item.kind])).toEqual([
|
|
|
+ ["p2", "数据分析", "approval"],
|
|
|
+ ["p1", "光学", "failed"],
|
|
|
+ ])
|
|
|
+})
|
|
|
+
|
|
|
+test("global inbox reads seen state per project", () => {
|
|
|
+ const items = buildInbox({
|
|
|
+ projects: [
|
|
|
+ { id: "p1", name: "光学" },
|
|
|
+ { id: "p2", name: "数据分析" },
|
|
|
+ ],
|
|
|
+ seen: new Map([
|
|
|
+ ["p1", new Set(["unread:run-a"])],
|
|
|
+ ["p2", new Set()],
|
|
|
+ ]),
|
|
|
+ chats: [
|
|
|
+ chat("a", "p1", [{ id: "m1", role: "assistant", runID: "run-a", status: "completed", text: "A" }]),
|
|
|
+ chat("b", "p2", [{ id: "m2", role: "assistant", runID: "run-b", status: "completed", text: "B" }]),
|
|
|
+ ],
|
|
|
+ tasks: [],
|
|
|
+ })
|
|
|
+ expect(items.map((item) => item.projectID)).toEqual(["p2"])
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+调整已有测试:把 `buildProjectInbox` 改为 `buildInbox`,增加 `projects` 参数,`seen` 从 `Set` 改为 `Map<string, Set<string>>`;原“当前项目”断言改成“只包含项目列表中的聊天”。
|
|
|
+
|
|
|
+- [ ] **Step 2: 运行测试确认失败**
|
|
|
+
|
|
|
+```bash
|
|
|
+(cd packages/app && bun test --conditions=solid --preload ./happydom.ts src/pages/paas/inbox.test.ts)
|
|
|
+```
|
|
|
+
|
|
|
+Expected: FAIL,`buildInbox` 不存在。
|
|
|
+
|
|
|
+- [ ] **Step 3: 实现全局聚合**
|
|
|
+
|
|
|
+```ts
|
|
|
+export type InboxProject = { id: string; name: string }
|
|
|
+
|
|
|
+export type InboxItem = {
|
|
|
+ id: string
|
|
|
+ kind: InboxKind
|
|
|
+ title: string
|
|
|
+ detail: string
|
|
|
+ projectID: string
|
|
|
+ projectName: string
|
|
|
+ chatID: string
|
|
|
+ runID?: string
|
|
|
+ at: number
|
|
|
+}
|
|
|
+
|
|
|
+export function buildInbox(input: {
|
|
|
+ chats: Chat[]
|
|
|
+ tasks: Record<string, unknown>[]
|
|
|
+ projects: InboxProject[]
|
|
|
+ seen: Map<string, Set<string>>
|
|
|
+}): InboxItem[] {
|
|
|
+ const projectNames = new Map(input.projects.map((project) => [project.id, project.name]))
|
|
|
+ const chats = input.chats.filter((chat) => !!chat.projectID && projectNames.has(chat.projectID) && !chat.archived)
|
|
|
+ const threads = new Map<string, Chat>()
|
|
|
+ for (const chat of chats) if (chat.threadID && !threads.has(chat.threadID)) threads.set(chat.threadID, chat)
|
|
|
+ const items = new Map<string, InboxItem>()
|
|
|
+ const add = (item: InboxItem) => {
|
|
|
+ const key = item.runID || item.id
|
|
|
+ if (!items.has(key)) items.set(key, item)
|
|
|
+ }
|
|
|
+ const seen = (projectID: string) => input.seen.get(projectID) || new Set<string>()
|
|
|
+
|
|
|
+ for (const chat of chats) {
|
|
|
+ const projectID = chat.projectID!
|
|
|
+ const projectName = projectNames.get(projectID)!
|
|
|
+ const projectSeen = seen(projectID)
|
|
|
+ for (const message of chat.messages) {
|
|
|
+ if (message.role !== "assistant" || !message.runID) continue
|
|
|
+ const at = message.updated || message.started || 0
|
|
|
+ if (["waiting_human", "waiting_confirmation"].includes(message.status || ""))
|
|
|
+ add({ id: `approval:${message.runID}`, kind: "approval", title: chat.title, detail: "需要确认后才能继续", projectID, projectName, chatID: chat.id, runID: message.runID, at })
|
|
|
+ else if (message.status === "failed")
|
|
|
+ add({ id: `failed:${message.runID}`, kind: "failed", title: chat.title, detail: message.error || "任务执行失败", projectID, projectName, chatID: chat.id, runID: message.runID, at })
|
|
|
+ else if (["completed", "partial"].includes(message.status || "") && message.text && !projectSeen.has(`unread:${message.runID}`))
|
|
|
+ add({ id: `unread:${message.runID}`, kind: "unread", title: chat.title, detail: chat.name, projectID, projectName, chatID: chat.id, runID: message.runID, at })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (const task of input.tasks) {
|
|
|
+ const runID = paasText(task.run_id) || paasText(task.id)
|
|
|
+ const threadID = paasText(task.thread_id) || paasText(task.session_id)
|
|
|
+ const chat = threadID ? threads.get(threadID) : undefined
|
|
|
+ if (!runID || !chat || items.has(runID) || !chat.projectID) continue
|
|
|
+ const projectID = chat.projectID
|
|
|
+ const projectName = projectNames.get(projectID)!
|
|
|
+ const projectSeen = seen(projectID)
|
|
|
+ const status = paasStatus(task)
|
|
|
+ const at = time(task.updated_at) || time(task.created_at)
|
|
|
+ if (status.startsWith("waiting"))
|
|
|
+ add({ id: `approval:${runID}`, kind: "approval", title: chat.title, detail: "任务需要确认", projectID, projectName, chatID: chat.id, runID, at })
|
|
|
+ else if (status === "failed")
|
|
|
+ add({ id: `failed:${runID}`, kind: "failed", title: chat.title, detail: paasText(task.error_message) || "任务执行失败", projectID, projectName, chatID: chat.id, runID, at })
|
|
|
+ else if (["completed", "partial"].includes(status) && !projectSeen.has(`unread:${runID}`))
|
|
|
+ add({ id: `unread:${runID}`, kind: "unread", title: chat.title, detail: chat.name, projectID, projectName, chatID: chat.id, runID, at })
|
|
|
+ }
|
|
|
+
|
|
|
+ const priority: Record<InboxKind, number> = { approval: 0, failed: 1, unread: 2 }
|
|
|
+ return [...items.values()].sort((a, b) => priority[a.kind] - priority[b.kind] || b.at - a.at)
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+删除 `buildProjectInbox`,更新所有调用和测试。
|
|
|
+
|
|
|
+- [ ] **Step 4: 运行测试**
|
|
|
+
|
|
|
+```bash
|
|
|
+(cd packages/app && bun test --conditions=solid --preload ./happydom.ts src/pages/paas/inbox.test.ts)
|
|
|
+```
|
|
|
+
|
|
|
+Expected: PASS;覆盖多项目、项目名称、每项目已读、归档会话和任务映射。
|
|
|
+
|
|
|
+- [ ] **Step 5: 提交**
|
|
|
+
|
|
|
+```bash
|
|
|
+git add packages/app/src/pages/paas/inbox.ts packages/app/src/pages/paas/inbox.test.ts
|
|
|
+git commit -m "feat(paas): aggregate inbox across projects"
|
|
|
+```
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+### Task 2: 跨项目 seen 与打开回调
|
|
|
+
|
|
|
+**Files:**
|
|
|
+- Modify: `packages/app/src/pages/paas/chat.tsx`
|
|
|
+- Modify: `packages/app/src/pages/paas/index.tsx`
|
|
|
+
|
|
|
+**Interfaces:**
|
|
|
+- Consumes: `buildInbox`、`InboxProject`
|
|
|
+- Produces:
|
|
|
+ - `PaasChat.props.projects: InboxProject[]`
|
|
|
+ - `PaasChat.props.onProjectChange: (id: string) => void`
|
|
|
+ - 全局 Inbox memo;跨项目打开顺序:activate → change project → show chat → mark seen
|
|
|
+
|
|
|
+- [ ] **Step 1: 修改项目/已读接入**
|
|
|
+
|
|
|
+`chat.tsx`:
|
|
|
+
|
|
|
+```ts
|
|
|
+import { buildInbox, type InboxItem, type InboxProject } from "./inbox"
|
|
|
+
|
|
|
+projects: InboxProject[]
|
|
|
+onProjectChange: (id: string) => void
|
|
|
+```
|
|
|
+
|
|
|
+将 `seenKey`/`seen` 替换为项目级读取:
|
|
|
+
|
|
|
+```ts
|
|
|
+const seenFor = (projectID: string) =>
|
|
|
+ readInboxSeen(localStorage, inboxSeenKey(props.scope || "local", platform.windowID || "main", projectID))
|
|
|
+const seen = createMemo(() => {
|
|
|
+ seenVersion()
|
|
|
+ return new Map(props.projects.map((project) => [project.id, seenFor(project.id)]))
|
|
|
+})
|
|
|
+const inbox = createMemo(() =>
|
|
|
+ buildInbox({
|
|
|
+ chats: state.chats,
|
|
|
+ tasks: props.inboxTasks(),
|
|
|
+ projects: props.projects,
|
|
|
+ seen: seen(),
|
|
|
+ }),
|
|
|
+)
|
|
|
+```
|
|
|
+
|
|
|
+点击:
|
|
|
+
|
|
|
+```ts
|
|
|
+const openInboxItem = (item: InboxItem) => {
|
|
|
+ model.activate(item.chatID)
|
|
|
+ props.onProjectChange(item.projectID)
|
|
|
+ props.onShowChat?.()
|
|
|
+ if (item.kind !== "unread") return
|
|
|
+ try {
|
|
|
+ markInboxSeen(
|
|
|
+ localStorage,
|
|
|
+ inboxSeenKey(props.scope || "local", platform.windowID || "main", item.projectID),
|
|
|
+ item.id,
|
|
|
+ )
|
|
|
+ setSeenVersion((value) => value + 1)
|
|
|
+ } catch {
|
|
|
+ // Storage can be unavailable; keep the item until the session ends.
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+`index.tsx`:
|
|
|
+
|
|
|
+```tsx
|
|
|
+projects={projects.projects.filter((project) => !project.archivedAt)}
|
|
|
+onProjectChange={(id) => {
|
|
|
+ setProjects("activeID", id)
|
|
|
+ saveProjects()
|
|
|
+}}
|
|
|
+```
|
|
|
+
|
|
|
+- [ ] **Step 2: 运行类型检查和现有 Inbox/项目回归**
|
|
|
+
|
|
|
+```bash
|
|
|
+(cd packages/app && bun typecheck)
|
|
|
+(cd packages/app && bun x --no-install playwright test e2e/paas/inbox.spec.ts e2e/paas/project-workflow.spec.ts --config e2e/paas/playwright.config.ts)
|
|
|
+```
|
|
|
+
|
|
|
+Expected: PASS;现有当前项目测试仍成立。
|
|
|
+
|
|
|
+- [ ] **Step 3: 提交**
|
|
|
+
|
|
|
+```bash
|
|
|
+git add packages/app/src/pages/paas/chat.tsx packages/app/src/pages/paas/index.tsx
|
|
|
+git commit -m "feat(paas): open inbox items across projects"
|
|
|
+```
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+### Task 3: 项目标签与跨项目 E2E
|
|
|
+
|
|
|
+**Files:**
|
|
|
+- Modify: `packages/app/src/pages/paas/inbox-panel.tsx`
|
|
|
+- Modify: `packages/app/src/pages/paas/studio.css`
|
|
|
+- Create: `packages/app/e2e/paas/global-inbox.spec.ts`
|
|
|
+
|
|
|
+**Interfaces:**
|
|
|
+- Consumes: `InboxItem.projectName`
|
|
|
+- Produces: 条目显示项目名;点击后切换到目标项目并打开会话
|
|
|
+
|
|
|
+- [ ] **Step 1: 写失败 E2E**
|
|
|
+
|
|
|
+```ts
|
|
|
+import { expect, test } from "@playwright/test"
|
|
|
+
|
|
|
+test("global inbox shows another project and opens it", async ({ page }) => {
|
|
|
+ await page.goto("/e2e/paas/index.html?completed")
|
|
|
+ await page.getByLabel("API Key", { exact: true }).fill("global-inbox")
|
|
|
+ await page.getByRole("button", { name: "连接平台", exact: true }).click()
|
|
|
+ await page.getByRole("button", { name: /已有研究/ }).first().click()
|
|
|
+
|
|
|
+ await page.getByRole("button", { name: "新建项目", exact: true }).click()
|
|
|
+ await page.getByLabel("项目名称", { exact: true }).fill("第二个项目")
|
|
|
+ await page.getByRole("button", { name: "创建项目", exact: true }).click()
|
|
|
+ await expect(page.getByLabel("切换项目", { exact: true })).toContainText("第二个项目")
|
|
|
+
|
|
|
+ const inbox = page.getByRole("button", { name: /待处理 1 项/ })
|
|
|
+ await expect(inbox).toBeVisible()
|
|
|
+ await inbox.click()
|
|
|
+ const panel = page.getByRole("dialog", { name: "待处理" })
|
|
|
+ await expect(panel.getByText("我的研究", { exact: true })).toBeVisible()
|
|
|
+ await panel.getByRole("button", { name: /已有研究/ }).click()
|
|
|
+ await expect(page.getByLabel("切换项目", { exact: true })).toContainText("我的研究")
|
|
|
+ await expect(page.getByText("研究计划", { exact: true })).toBeVisible()
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+- [ ] **Step 2: 运行测试确认失败**
|
|
|
+
|
|
|
+```bash
|
|
|
+(cd packages/app && bun x --no-install playwright test e2e/paas/global-inbox.spec.ts --config e2e/paas/playwright.config.ts)
|
|
|
+```
|
|
|
+
|
|
|
+Expected: FAIL,尚未显示项目名或无法跨项目打开。
|
|
|
+
|
|
|
+- [ ] **Step 3: 显示项目名**
|
|
|
+
|
|
|
+`inbox-panel.tsx` 的条目增加:
|
|
|
+
|
|
|
+```tsx
|
|
|
+<span class="paas-inbox-project">{item().projectName}</span>
|
|
|
+```
|
|
|
+
|
|
|
+保留 kind、标题、detail、时间;项目名使用弱文字,不与标题抢层级。
|
|
|
+
|
|
|
+`studio.css`:
|
|
|
+
|
|
|
+```css
|
|
|
+.paas-inbox-project {
|
|
|
+ color: var(--text-weak);
|
|
|
+ font-size: var(--paas-type-meta);
|
|
|
+}
|
|
|
+.paas-inbox-item > .paas-inbox-project {
|
|
|
+ font-weight: 500;
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+- [ ] **Step 4: 运行 E2E 和完整 Inbox/项目回归**
|
|
|
+
|
|
|
+```bash
|
|
|
+(cd packages/app && bun x --no-install playwright test e2e/paas/global-inbox.spec.ts e2e/paas/inbox.spec.ts e2e/paas/project-workflow.spec.ts --config e2e/paas/playwright.config.ts)
|
|
|
+```
|
|
|
+
|
|
|
+Expected: PASS。
|
|
|
+
|
|
|
+- [ ] **Step 5: 提交**
|
|
|
+
|
|
|
+```bash
|
|
|
+git add packages/app/src/pages/paas/inbox-panel.tsx packages/app/src/pages/paas/studio.css packages/app/e2e/paas/global-inbox.spec.ts
|
|
|
+git commit -m "feat(paas): label inbox items with project"
|
|
|
+```
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+### Task 4: 回归、文档与限制说明
|
|
|
+
|
|
|
+**Files:**
|
|
|
+- Modify: `packages/app/src/pages/paas/README.md`
|
|
|
+- Modify: `PAAS_GLOBAL_INBOX_PLAN.zh-CN.md` 仅当实现与计划有偏差
|
|
|
+
|
|
|
+**Interfaces:**
|
|
|
+- Consumes: Task 1–3
|
|
|
+- Produces: 全局 Inbox 文档与完整验收证据
|
|
|
+
|
|
|
+- [ ] **Step 1: 更新 README**
|
|
|
+
|
|
|
+```md
|
|
|
+## P0-C Global Inbox(2026-11-30)
|
|
|
+
|
|
|
+- 顶栏待处理入口现在聚合所有项目的待确认、失败和完成未读。
|
|
|
+- 条目显示项目名称;点击会切换到目标项目并打开对应会话。
|
|
|
+- 已读状态继续按项目隔离;点击其他项目条目只写入该项目的已读 key。
|
|
|
+- 归档会话不进入 Inbox。
|
|
|
+- 未归属任何项目线程的平台任务仍不进入 v1;需要在 P1 任务中心一并处理。
|
|
|
+- 复用线程仍沿用首次项目的归属,跨项目线程所有权留到后续。
|
|
|
+```
|
|
|
+
|
|
|
+- [ ] **Step 2: 完整单测**
|
|
|
+
|
|
|
+```bash
|
|
|
+(cd packages/app && bun test --conditions=solid --only-failures --preload ./happydom.ts src/pages/paas)
|
|
|
+```
|
|
|
+
|
|
|
+Expected: PASS。
|
|
|
+
|
|
|
+- [ ] **Step 3: 完整浏览器回归**
|
|
|
+
|
|
|
+```bash
|
|
|
+(cd packages/app && bun x --no-install playwright test e2e/paas --config e2e/paas/playwright.config.ts)
|
|
|
+```
|
|
|
+
|
|
|
+Expected: PASS。
|
|
|
+
|
|
|
+- [ ] **Step 4: 类型检查与构建**
|
|
|
+
|
|
|
+```bash
|
|
|
+(cd packages/app && bun typecheck)
|
|
|
+(cd packages/desktop && bun typecheck)
|
|
|
+(cd packages/app && bun run build)
|
|
|
+```
|
|
|
+
|
|
|
+Expected: exit 0;仅允许已知 Windows custom-elements 符号链接错误,需在报告中明确。
|
|
|
+
|
|
|
+- [ ] **Step 5: 提交**
|
|
|
+
|
|
|
+```bash
|
|
|
+git add packages/app/src/pages/paas/README.md PAAS_GLOBAL_INBOX_PLAN.zh-CN.md
|
|
|
+git commit -m "docs(paas): document global research inbox"
|
|
|
+```
|
|
|
+
|
|
|
+---
|
|
|
+
|
|
|
+## P0-C 验收清单
|
|
|
+
|
|
|
+- [ ] 顶栏待处理计数包含所有项目的可确认事项。
|
|
|
+- [ ] 条目显示项目名称。
|
|
|
+- [ ] 点击其他项目条目会切换 active project 并打开目标会话。
|
|
|
+- [ ] 跨项目未读只写入目标项目的 seen key。
|
|
|
+- [ ] 当前项目、其他项目、归档项目的过滤都正确。
|
|
|
+- [ ] 任务索引只通过已知项目线程归属。
|
|
|
+- [ ] 未归属任务不进入 v1,并在 README 明确。
|
|
|
+- [ ] 1280/600、亮暗主题无横向溢出。
|
|
|
+- [ ] 单测、完整 E2E、双端类型检查和构建通过。
|
|
|
+
|
|
|
+## 后续计划
|
|
|
+
|
|
|
+1. **P1 任务中心统一**:未归属任务、任务/会话/成果统一索引。
|
|
|
+2. **P1 Run Inspector 2.0**:阶段、证据、成本、恢复点和子智能体记录。
|
|
|
+3. **P1 成果资产库**:项目级文件树、版本、比较和交付包。
|
|
|
+4. **P2 项目上下文与团队能力**。
|
|
|
+
|
|
|
+## Self-Review
|
|
|
+
|
|
|
+- **Spec coverage:** 覆盖跨项目 Inbox、项目名称、跨项目打开、按项目已读、归档过滤和文档限制。
|
|
|
+- **Deferred coverage:** 未归属任务、`needs_clarification`、跨项目线程所有权、平台已读同步明确不在 v1。
|
|
|
+- **Placeholder scan:** 无 TBD、TODO、未定义函数或“按实际情况调整”的步骤。
|
|
|
+- **Type consistency:** `InboxProject`、`buildInbox`、`InboxItem.projectName` 在任务间一致。
|