[Bug]: Sidebar project filter uses Shift-click instead of ⌘-click to add or remove a project

未关闭 适合新手
#40,367 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
react, typescript
领域
frontend

调研方向

两个 handler 都位于 apps/web/src/components/Sidebar.tsx:先读第 1580-1590 行的 thread-list 切换逻辑,因为它在非 macOS 上已经根据 metaKey 和 ctrlKey 分支,再读第 3031-3040 行只检查 shiftKey 的 project filter 点击 handler。把同样的修饰键检查复制到 project filter 中,使 ⌘/Ctrl-click 在现有选择中切换某个 project 并保持菜单打开,而普通 click 仍作为替换选择。完成意味着复现 issue 中的三步场景(两次 shift-click,然后 ⌘-click 第三个)会显示选中三个 project 且菜单仍打开,第二次 ⌘-click 只移除那一个;在 macOS 上检查,并在可用时在 Windows/Linux 上检查 ctrlKey 分支。

由索引模型根据 Issue 内容生成。

描述

The sidebar project filter uses Shift-click to add or remove a project. The convention is ⌘-click on macOS and Ctrl-click on Windows and Linux; no desktop OS uses Shift-click for this. In T3, ⌘-click instead acts like a plain click: the filter switches to that one project and the menu closes, so the selection you had is gone.

It's one of the oldest selection conventions on the desktop:

  • ⌘-click (Ctrl-click on Windows and Linux) adds or removes a single item (Apple: Select items on Mac).
  • Shift-click selects a range.

T3's own thread list already follows it.

Steps to reproduce

  1. Open the sidebar project filter.
  2. Shift-click two projects.
  3. ⌘-click a third.

Expected: the third project is added and the menu stays open. ⌘-clicking it again removes just that project.

Actual: the filter shows only the third project and the menu closes.

Where it happens

Multi-select came in with #25284, which chose Shift-click and Shift+Enter.

Suggestion: use ⌘-click (Ctrl-click off macOS) instead of Shift-click to add or remove a project, the same check the thread list uses. Shift-click normally selects a range, which doesn't fit a menu where each project is picked on its own.

Seen in T3 Code 0.1.11 on macOS.

主要语言
TypeScript
星标
24.8k
派生
6.4k
平均合并
3 小时 11 分钟
30 天内合并 PR
466

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pingdotgg/t3code 的其他 Issue

查看 pingdotgg/t3code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。