Merge pull request '修复:AGC 窗口标题栏项目标签改认当前项目(#618)' (#621) from fix/agc-titlebar-project-label into master
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 6m47s
Project CI / AI game creator shell Rust crates (push) Successful in 4m38s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 6m6s
Project CI / Frontend tests (push) Successful in 3m41s
Project CI / Backend tests (push) Successful in 8m0s
Project CI / AI game creator shell web tests (push) Successful in 2m48s
Project CI / Repository checks (push) Successful in 7m17s
Project CI / Native shell tests (push) Successful in 9m27s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 6m47s
Project CI / AI game creator shell Rust crates (push) Successful in 4m38s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 6m6s
Project CI / Frontend tests (push) Successful in 3m41s
Project CI / Backend tests (push) Successful in 8m0s
Project CI / AI game creator shell web tests (push) Successful in 2m48s
Project CI / Repository checks (push) Successful in 7m17s
Project CI / Native shell tests (push) Successful in 9m27s
Reviewed-on: http://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/621
This commit was merged in pull request #621.
This commit is contained in:
@@ -9614,6 +9614,15 @@ CI 上 `background_agent_runtime_recovers_stale_running_before_pending_task` 在
|
||||
- 边界(未验证):macOS 真机的 sidecar 加载与 `check-macos-bundle.mjs` 包内容门禁未在本机验证;Linux 门禁按新配置不再要求 sidecar 资源,需 CI 实跑确认转绿。
|
||||
- 关联:issue #519、master `fb130d184`、`docs/technical/【技术方案】AGC随包资源staging归位-2026-09-26.md`、CI run 3083。
|
||||
|
||||
## 2026-10-04 AGC 窗口标题栏项目标签改认「当前项目」,运行中项目降级为圆点与徽标
|
||||
|
||||
- 背景:issue #618。窗口标题栏那枚标签原来被「正在运行的项目」整块接管——`WindowChrome` 只要存在活动回合或运行快照读取失败,就把当前工作区标题换成 `ActiveProjectRunsPanel`(titlebar 形态),主文案取开始时间最晚的在跑项目。于是「当前项目没在跑、后台别的项目在跑」时,标签显示的是别的项目(现场:当前项目 `gameagent-ff7f3240`,标签 `gameagent-c3af9c7e`),用户以为自己开错了项目;读取失败时标签还会变成「正在运行的项目读取失败」,同样顶掉当前项目名。
|
||||
- 决策(主文案):标签主文案恒为当前项目名,与当前项目是否在跑回合无关;不在项目内(首页 / 项目组 / 模板库)才回落到最后开始的在跑项目(该回落按视图门控,见 2026-10-05 条目)。名字由 `WorkspaceLauncher` 经 `WindowChromeActiveProjectRuns.currentProjectName` 发布(`currentProjectContext.projectName`,即清单项目名)。这同时消掉了同一项目「有回合在跑显示目录名、没在跑显示项目名」的两种口径。
|
||||
- 决策(运行态):圆点 + 运行中数量徽标(≥1 即显示)+ 展开菜单;菜单里当前项目那一行用与标签同名的项目名,meta 首位带「当前」标记,`aria-current` 保留。读取失败改成告警色圆点 + 菜单内一行结论;只有既没有在跑项目、又没有当前项目可显示时才保留原来的纯提示。
|
||||
- 有意未做:后台项目在菜单里仍是目录名(快照 `projectName` 由 Rust 取 `thread_id` 目录名)。改成清单项目名要在 `ThreadManager` 的 claim 路径里读 `.agent/manifest.json`,等于给纯内存模块加锁内文件 I/O,本轮不做。
|
||||
- 影响范围:`apps/ai-game-creator-shell/src/components/WindowChrome.tsx`、`src/components/windowChromeContext.ts`、`src/features/app-shell/ActiveProjectRunsPanel.tsx`、`src/features/app-shell/WorkspaceLauncher.tsx`、`src/styles.css` 与两个定向用例文件;同步修正主规范 2026-09-15 段的标题栏条目、里程碑文末修订与实施计划 `修改顺序` 条目。不改 Rust、快照命令字段、公共 API 与持久化。
|
||||
- 验证方式:`npx vitest run apps/ai-game-creator-shell/tests/directActiveTurns.test.tsx apps/ai-game-creator-shell/tests/WindowChrome.test.tsx apps/ai-game-creator-shell/tests/workspaceWindowSync.test.tsx` → 22 passed(三条新回归:别的项目在跑时标签仍是当前项目、当前项目自己跑时列表带「当前」、读取失败不顶掉当前项目名);评审后续修订后为 25 passed,见下条。全量 `npm run test -- apps/ai-game-creator-shell/tests` 与真实 Chromium 冒烟见 PR。
|
||||
- 关联:issue #618、`docs/project-memory/plans/【里程碑】Direct回合跨页面生命周期与运行中项目可见性-2026-09-15.md`(2026-10-04 修订)。
|
||||
|
||||
## 2026-10-04:Direct 普通操作与交付复核解耦
|
||||
|
||||
@@ -9644,3 +9653,13 @@ CI 上 `background_agent_runtime_recovers_stale_running_before_pending_task` 在
|
||||
- Linux 排除僵尸时必须保守处理不完整扫描;数字 PID 的读取/解析不确定性不能成为组已空的证据,已确认消失的 PID 可以忽略。
|
||||
- 正常关闭连接的迟到通知不创建或覆盖成功回合的终态报告;无合同收尾新产生的预算报告优先返回,其他真实关闭错误保留。
|
||||
- 权威边界见[Direct 合同规则](../../technical/【技术方案】AI游戏创作智能体App实施计划-2026-06-24.md#宿主验收与执行许可合同)。视觉/玩法判据和预算值不变。
|
||||
|
||||
## 2026-10-05:AGC 标题栏项目标签评审后续(空态、视图门控与文案)
|
||||
|
||||
- 背景:对 issue #618 的标题栏修复做 PR 评审,发现四处与文档或组件自身注释相反的行为,逐条修正;#618 现场(当前项目没在跑、后台别的项目在跑)的结论不变。
|
||||
- 面板形态误报读取失败:`ActiveProjectRunsPanel` 的空态早退只判「没有在跑回合」,把「快照读取成功、只是没有在跑回合」渲染成「未能读取正在运行的项目」。补回 `!readFailed` 守卫;`panel` 是默认 prop,唯一生产调用方 `WindowChrome` 恒用 `titlebar`,但组件注释对外宣称面板布局可复用。
|
||||
- 会话残留的项目身份:`currentProjectContext` 是会话级状态(离开工作台不清空),活动回合快照却是全局轮询;照搬上下文会让首页 / 项目组 / 模板库上的标签一直写「当前项目:<上次打开的项目>」,徽标数字却属于别的项目,也让「不在项目内回落到最近启动的在跑项目」实际不可达。发布时按 `launcherView === 'project-development'` 门控 `currentProjectPath` / `currentProjectName`,与同文件窗口标题 effect 同口径。
|
||||
- 文案去重:读取失败结论曾在菜单头部与 `role=status` 行连排两遍,头部改为只报数量;回落态触发文案原为「正在运行的项目:X;正在运行 N 个项目」,拆成「作用域 + 运行状态」(回落态作用域记为「最近运行的项目:X」,状态位「共 N 个项目在运行」);数量徽标补 `title` 说明数字含义。
|
||||
- 仍有意不做:后台项目在菜单里是目录名;判定 `aria-current` 的路径匹配仍是 `projectPathsMatchForInvalidation`;不改 Rust、快照命令字段、公共 API 与持久化。
|
||||
- 验证方式:`npx vitest run apps/ai-game-creator-shell/tests/directActiveTurns.test.tsx apps/ai-game-creator-shell/tests/WindowChrome.test.tsx apps/ai-game-creator-shell/tests/workspaceWindowSync.test.tsx` → 25 passed;对照旧实现分别临时禁用 `launcherView` 门控、去掉面板空态守卫,对应用例各自转红。真机运行时证据仍缺,见里程碑文末「仍未取得证据」。
|
||||
- 关联:issue #618、本文件上一条(2026-10-04 标题栏项目标签)、`docs/project-memory/plans/【里程碑】Direct回合跨页面生命周期与运行中项目可见性-2026-09-15.md`(2026-10-05 修订)。
|
||||
|
||||
Reference in New Issue
Block a user