Skip to content

feat(desktop): simplify task titlebar and adjacent actions - #4985

Merged
Astro-Han merged 6 commits into
mainfrom
fix/session-titlebar-layout
Sep 7, 2026
Merged

feat(desktop): simplify task titlebar and adjacent actions#4985
Astro-Han merged 6 commits into
mainfrom
fix/session-titlebar-layout

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Make the current task the titlebar's primary label and keep its controls inside the conversation column when the right workbar expands.

  • Keep click-to-rename on the title and place an Astryx MoreMenu immediately beside it. Long titles truncate before the menu; short titles keep the same 4px gap.
  • Replace the project breadcrumb with a folder menu before the title: project name/path, Open project folder, and Copy path. Keep Rename and Share in the adjacent task menu. Child tasks use that leading position for the parent arrow and retain project information/actions in their task menu. Clipboard writes reuse the existing feedback hook.
  • Show a compact return arrow only for linked child tasks. It opens the direct parent, with the parent's name in the accessible label and tooltip; root tasks have no arrow.
  • Build on merged fix(desktop): keep titlebar actions clear of workbar #4829 for the shared workbar width and responsive reserve. Add matching titlebar collapse/expand animation, disable that animation during direct resizing, and retain the upstream narrow-layout regression with the new Share menu entry. The duplicate wide test is covered by the broader title/menu geometry story.

Refs #4679. Based on merged #4829, which fixes #4826.

Before / after

Same existing WorkbarCollapseKeepsOneToggleInPlace story, 1280×800 viewport, 600px workbar, and identical long title seeded into the rendered fixture. Before is main 86404941d, including #4829; after is this branch rebased onto that commit. Complete viewports are shown.

Light titlebar comparison

Dark titlebar comparison

Project information menu

Verification

  • Regression: the copy row remains open and visibly reports failure, supports retry, and reports success. A narrow Storybook scenario verifies failure/retry and semantic name/path styling across wrapped project names. Both themes were also inspected through CDP.

Copy feedback and wrapped project name

  • Project-menu typography: project name, path, and actions all measure 14px in light/dark; the project name uses medium weight and the path uses secondary text color.

  • Storybook build and catalog smoke: 322 stories / 349 theme renders passed, including direct-parent return.

  • Focused story play passed in light/dark at 1280, 1000, 990, and 720px: title/menu bounds and hit testing, drag regions, direct and menu rename, Escape focus restoration, and Share callback/focus. Short and long titles both measured a 4px menu gap and 28px menu target.

  • Full Electron application inspected through CDP: events dispatched through the actual ResizeHandle at 340/480/600px across those four window widths. Controller and shared CSS widths stayed synchronized, with no overlap or renderer exceptions. The menu opens the existing Share surface.

  • Earlier Electron collapse/expand probe sampled 34 distinct widths in each direction without overlap. Removing the width reserve restored 376px overlap; restoring it removed the overlap. Native OS window movement itself was not automated.

  • Project-menu routing is covered in the root and parent-return stories; browser clipboard checks in light/dark confirmed the exact project path.

  • Desktop typecheck, main/preload/renderer builds, format, lint, Astryx inventory, renderer architecture check, and git diff --check passed.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex shaped the design with the maintainer, implemented the layout and interaction changes, validated Storybook/Electron behavior, and prepared comparison images and this PR.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/M Under 500 readable lines label Sep 7, 2026
@Astro-Han
Astro-Han force-pushed the fix/session-titlebar-layout branch from a7d4a0a to 7831698 Compare September 7, 2026 15:06
@Astro-Han Astro-Han changed the title fix(desktop): keep session title within conversation chrome feat(desktop): simplify task titlebar and adjacent actions Sep 7, 2026
@Astro-Han
Astro-Han force-pushed the fix/session-titlebar-layout branch from 7831698 to 143fce8 Compare September 7, 2026 15:45
@Astro-Han
Astro-Han marked this pull request as ready for review September 7, 2026 16:08
@github-actions github-actions Bot added effort/L Under 1000 readable lines and removed effort/M Under 500 readable lines labels Sep 7, 2026

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at exact head 9bf0d2a06 by two independent reviewers, one on what the deletion removes and one on what the result actually renders. No introduced P0–P3. Only test ran on this commit, and it was not terminal at the time of writing; neither reviewer treated it as evidence.

The risk in a change that removes 154 lines net is not that the new code is wrong — it is that a behaviour left without a home looks like tidiness. So each removed action was traced to a successor rather than checked for compile-time references. Parent return, direct and menu rename, Share, open folder, read-only and no-project shapes all remain reachable; the root task's project context is now its own menu, and Rename did not drift into it.

The presentation half was measured rather than eyeballed, and re-measured after the CSS and story changes invalidated the first pass. At a 600 px workbar the long title truncates while the neighbouring controls stay visible and hit-testable — identity spans 260–769, Project Info 272–300, the title 304–737, the task menu 741–769, and the workbar begins at 837. Keyboard opening, menu navigation, and focus restoration to the trigger all hold, and Escape from rename returns focus to the name button. Actions that cannot be performed are hidden rather than disabled, which matches the prior eligibility policy.

One boundary is worth stating because it is the kind that usually goes unsaid: the story named for clearing the titlebar reserve runs a 600 px workbar under a normal wide viewport, so it is not by itself proof of the sub-991 px media query. That conclusion rests on the explicit later CSS reset and the import order, not on the story's name.

One acceptance boundary, deliberately not filed as a finding. With viewClientPath false, opening the folder is blocked but the host path still appears in project info and can be copied. The path there does not come from the gated client-path channel — it arrives as hostCwd through the canonical Session projection and the session-cwd fallback. The architecture contract states that hostCwd may enter that projection and is not a path-confidentiality boundary; viewClientPath gates treating a host path as a client-local path to open or execute, not displaying or copying it. So this is the documented shape rather than a capability bypass — but the two now sit adjacent in one menu, and a future reader may reasonably expect the capability to cover both.

简体中文

在 exact head 9bf0d2a06 上由两位独立评审分别审查:一位看这次删除拿掉了什么,一位看结果实际渲染成什么。无引入的 P0–P3。 该 commit 上只跑了 test,且撰写时尚未终态;两位都没有把它当作证据。

净删 154 行的改动,风险不在新代码写错,而在于「一个没有归宿的行为看起来像是整洁」。 所以每一个被删的操作都被追到了新归宿,而不是只查编译期引用。父任务返回、直接与菜单重命名、Share、打开文件夹、只读与无项目形状均仍可达;根任务的项目上下文now自成一个菜单,而 Rename 没有被误挪进去。

呈现那一半是量出来的,不是看出来的,并且在 CSS 与 story 改动使第一轮证据失效之后重新量过。600px workbar 下长标题截断,而相邻控件仍可见、可命中 —— identity 跨 260–769,Project Info 272–300,标题 304–737,任务菜单 741–769,workbar 起于 837。键盘打开、菜单导航、焦点回到触发器都成立;从重命名按 Escape 会把焦点交回名称按钮。不可执行的操作是被隐藏而不是禁用,与此前的资格策略一致。

有一处边界值得写出来,因为这类边界通常会被略过:那个以「清除标题栏预留」命名的 story,跑的是正常宽视口下的 600px workbar,所以它本身并不构成对 991px 以下媒体查询的证明。那个结论依据的是后续 CSS 的显式 reset 与 import 顺序,而不是 story 的名字。

一处验收边界,刻意不作为 finding 立项。viewClientPath 为假时,打开文件夹被挡住,但 host 路径仍出现在项目信息中并可复制。那里的路径并非来自被门控的客户端路径通道 —— 它是以 hostCwd 经 canonical Session projection 与 session-cwd 兜底到达的。架构合同写明 hostCwd 可以进入该投影,且它不是路径保密边界;viewClientPath 门控的是把 host 路径当作客户端本地路径去打开或执行,而不是展示或复制。所以这是有文档依据的形状,而非能力绕过 —— 但两者现在相邻地出现在同一个菜单里,日后读代码的人有理由以为该能力两者都管。


Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at exact head 9bf0d2a06. test and label are terminal green here, and two independent reviewers found no introduced P0–P3 — one tracing what the deletion removes, one measuring what the result renders.

Details are in my earlier comment on this head. In short: every removed action was traced to a successor rather than checked for compile-time references; the presentation evidence was measured, and re-measured after the CSS and story changes invalidated the first pass; and the viewClientPath path-visibility question resolves to the documented shape — hostCwd reaches the menu through the canonical Session projection, which the architecture contract states is not a path-confidentiality boundary, while the capability continues to gate opening.

One thing this approval does not clear, and a maintainer should settle before merge. The authorisation for this titlebar geometry and identity work carries a stated precondition: that #2628 land or be superseded first. #2628 is still open and currently conflicting, and this head does not supersede its front-surface planner. The base's overlap fix does not substitute for that precondition, because the fix predates this branch rather than replacing the plan.

So this approval is about the code at this head, not about the sequencing. Either confirm the exception explicitly or update the tracker — but the decision belongs to whoever owns that authorisation, not to a review.

This is not the independent human review CONTRIBUTING.md requires, and it is not a merge decision.

简体中文

在 exact head 9bf0d2a06 上批准。testlabel 在此已终态转绿,两位独立评审均未发现引入的 P0–P3 —— 一位追查这次删除拿掉了什么,一位量测结果实际渲染成什么。

细节在我先前对该 head 的评论里。 简言之:每个被删的操作都追到了新归宿,而不是只查编译期引用;呈现证据是量出来的,并在 CSS 与 story 改动使第一轮失效后重新量过;而 viewClientPath 的路径可见性问题收敛为有文档依据的形状 —— hostCwd 是经 canonical Session projection 到达菜单的,架构合同写明它不是路径保密边界,而该能力继续门控「打开」。

有一件事本批准并未放行,应由维护者在合并前定夺。 这次标题栏几何与身份工作的授权带着一个明写的前置条件:#2628 需先落地或被取代。而 #2628 目前仍然开着、且处于冲突状态,本 head 也没有取代它的 front-surface planner。 base 中的 overlap 修复不能替代该前置 —— 因为那次修复早于本分支,而不是取代了那个计划。

所以本批准针对的是该 head 上的代码,而不是合并顺序。 要么明确确认这个例外,要么更新 tracker —— 但这个决定属于持有该授权的人,不属于一次评审。

这不是 CONTRIBUTING.md 所要求的独立人类审查,也不是合并决定。


Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.

@Astro-Han
Astro-Han merged commit 426e887 into main Sep 7, 2026
1 check passed
@Astro-Han
Astro-Han deleted the fix/session-titlebar-layout branch September 7, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/L Under 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(desktop): prevent long session titles from blocking side panel actions

2 participants