Uh oh!
There was an error while loading. Please reload this page.
feat(settings): rename and reveal a project from its row menu - #2447
Merged
Conversation
Completes the two actions #160 deferred, so the Projects page manages a project rather than only choosing a default. Reveal takes a project id, never a path. Main asks the catalog where that project lives and the existing `project` open-path guard re-checks the resolved directory, so the renderer cannot name an arbitrary folder for the shell to open. It is offered only while the catalog still vouches for the folder — a menu entry that could only fail is worse than one that is absent. Rename reuses `SettingsExpandableRow` rather than hand-rolling a second editor; it already owns the focus move into the field and back to the row, and the reasoning about why it carries no aria-expanded. It gained an `end` prop so a row that already owns its end slot — a default Badge, 设为默认, and the … menu — keeps that cluster instead of growing a second competing button. Rename is reached from the menu. Each row's … menu is now named after its project. Four buttons all called 更多操作 are one button to assistive tech; they were equally ambiguous to a test, which addressed a row by index and renamed the wrong project.
jackwener
commented
Aug 7, 2026
MemberAuthor
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了什么
补齐 #160 降级掉的两项,项目页从「只能选默认」变成「能管理项目」。task #161。
在访达中打开:传 id,不传路径
渲染层传 projectId,主进程向 catalog 问这个项目在哪,再交给已有的
projectopen-path 守卫复核解析后的目录。渲染层没有机会指定任意目录让 shell 打开 —— 这比把app:openPath放开成「接受任意路径」安全,也不需要新的守卫逻辑。只在 catalog 仍然认可该目录时才可点:一个必然失败的菜单项,比没有这个菜单项更糟。
重命名:复用既有原语,不是新造
SettingsExpandableRow本来就存在(外观页的显示名称在用),它已经封好了「打开时聚焦第一个控件、关闭时把焦点还给行」以及「为什么故意不挂 aria-expanded」这些判断。手写第二套编辑器等于把这些判断重做一遍还容易漏。给它加了一个
endprop:本来就自带尾部控件簇的行(默认 Badge / 设为默认 / … 菜单)保留自己的簇,而不是再长出一个和它们抢位置的「更改」按钮。重命名从 … 菜单进。既有调用方不传end,行为不变。顺带修一个真问题
每行的 … 菜单现在带上项目名(
更多操作:astryx-design-system)。四个都叫「更多操作」的按钮,对辅助技术来说等于同一个按钮;它们对测试也同样有歧义——我第一版 e2e 按下标定位,结果重命名了错误的那一行(app 会自注册一个工作区项目,导致渲染顺序和 fixture 种子顺序不一致)。是截图暴露的,不是断言。怎么验证的
reveal对目录不存在的项目返回ok:false。