Skip to content

fix(frontend): keep project thread kebab inside the sidebar - #5682

Merged
WillemJiang merged 2 commits into
bytedance:mainfrom
ggnnggez:fix/project-thread-kebab-overflow
Sep 22, 2026
Merged

WillemJiang merged 2 commits into
bytedance:mainfrom
ggnnggez:fix/project-thread-kebab-overflow

Conversation

@ggnnggez

@ggnnggez ggnnggez commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #5681

Why

In the sidebar's grouped Projects mode, the … (kebab) button on chat rows listed under a project is pushed past the sidebar's right edge and clipped, so it is hard to see and to click. Rows under the collapsed Archived group are nested one level deeper and lose the button entirely. The flat chat list is unaffected, which is why this slipped through: the project groups are the only indented SidebarMenu in the sidebar.

What changed

  • Chat rows grouped under a project now render their kebab fully inside the sidebar, matching the flat list.
  • Rows under the Archived group get their kebab back.
  • No behavior, data, or API change. The fix is two Tailwind classes in frontend/src/components/workspace/projects-section.tsx: the indented nested menus carry ml-4 but inherited SidebarMenu's w-full, so they were 100% + 16px wide (32px for the doubly nested Archived rows) and their absolutely positioned right-1 action landed outside the container. Both menus now use w-auto so the block-level flex container fills the remaining width minus its margin.

Surface area

  • Frontend UI — page / component / setting / interaction under frontend/
  • Backend API — endpoint / SSE event / request-response shape under backend/app
  • Agents / LangGraph — agent node, graph wiring, langgraph.json, or prompt change
  • Sandbox — docker/ or sandboxed execution
  • Skills — change under skills/
  • Dependencies — new/upgraded entry in backend/pyproject.toml or frontend/package.json (say what it buys us)
  • Default behavior change — changes existing behavior without the user opting in (default model, default setting, data shape)
  • Docs / tests / CI only — no runtime behavior change

Screenshots / Recording

Entry point: sidebar → Projects header → display-mode toggle ("Group chats by project") → hover a chat row under a project.

Before (kebab clipped at the sidebar edge):
2026-09-22_11-04-03

After (kebab fully visible):
2026-09-22_11-25-58

Bug fix verification

  • Test path that reproduces the bug: frontend/tests/unit/components/workspace/projects-section-nested-menu.dom.test.tsx
  • Did it go red on main and green on this branch? yes — it renders ProjectsSection in grouped mode from seeded query caches (active project, archived project, one chat each), expands the Archived group, and asserts that the menu around every row kebab carries w-auto and not w-full while the root menu keeps w-full. With the source change stashed it fails on the w-auto assertion; with it applied it passes.
  • happy-dom has no layout engine, so the regression is pinned at the class level rather than by measuring pixels; the test comment explains the geometry.

Validation

  • cd frontend && pnpm check (eslint + tsc --noEmit) — clean
  • cd frontend && pnpm exec prettier --check on both changed files — clean
  • cd frontend && pnpm rstest run projects-section-nested-menu — pass (and fails with the fix reverted)
  • cd frontend && pnpm rstest run thread-sidebar-item-delete-gating — pass (shares the row component)
  • cd frontend && pnpm test (full unit suite, 220 files) — 1868 pass, 27 pre-existing failures that are identical with this change and with the new test file removed: tests/unit/core/models/favorites-store.dom.test.tsx and tests/unit/core/settings/user-preferences.dom.test.tsx throw Cannot read properties of undefined (reading 'clear') from window.localStorage.clear() in their beforeEach, i.e. happy-dom exposes no localStorage under the local toolchain (Node v26.8.1, pnpm 11.22.0). Neither file imports the changed component. sidecar-delete-gating.dom.test.tsx additionally flaked once in the full run with an unhandled HTTP 404 from a live make dev server on localhost:3000; it passes alone.
  • Not run: pnpm build, E2E.
  • Verified visually in the running make dev stack: the kebab on project-grouped rows is back inside the sidebar.

AI assistance

Tool(s) used: Claude Code

How you used it: Claude Code traced the clipping from the component's nested SidebarMenu classes and the ui/sidebar primitive styles, proposed the w-auto fix, wrote the dom regression test, verified it goes red without the fix, filed #5681, and drafted this description. The reporter reproduced the bug and checked the fix in the running app.

  • I've read and understand every line of this change and take responsibility for it — it's not unreviewed AI output.

In grouped mode the sidebar indents a project's thread rows with a nested
SidebarMenu carrying ml-4, but SidebarMenu defaults to w-full. Width 100%
plus a 16px left margin overflows the sidebar by 16px, so the absolutely
positioned row kebab (right-1) lands past the visible edge and gets
clipped. The Archived group nests one level deeper and overflows 32px,
hiding its kebabs entirely.

Swap w-full for w-auto on both indented menus so the block-level flex
container fills the remaining width minus its margin. A dom test renders
ProjectsSection in grouped mode from seeded query caches and pins that
every indented menu drops w-full while the root menu keeps it.

Fixes bytedance#5681
@github-actions github-actions Bot added area:frontend Next.js frontend under frontend/ risk:medium Medium risk: regular code changes size/M PR changes 100-300 lines labels Sep 22, 2026
@ggnnggez ggnnggez added this to the 2.1.0 milestone Sep 22, 2026
@WillemJiang WillemJiang modified the milestones: 2.1.0, 2.2.0 Sep 22, 2026
@WillemJiang
WillemJiang merged commit ded0f0b into bytedance:main Sep 22, 2026
19 checks passed
vieenrose pushed a commit to vieenrose/deer-flow that referenced this pull request Sep 25, 2026
…e#5682)

In grouped mode the sidebar indents a project's thread rows with a nested
SidebarMenu carrying ml-4, but SidebarMenu defaults to w-full. Width 100%
plus a 16px left margin overflows the sidebar by 16px, so the absolutely
positioned row kebab (right-1) lands past the visible edge and gets
clipped. The Archived group nests one level deeper and overflows 32px,
hiding its kebabs entirely.

Swap w-full for w-auto on both indented menus so the block-level flex
container fills the remaining width minus its margin. A dom test renders
ProjectsSection in grouped mode from seeded query caches and pins that
every indented menu drops w-full while the root menu keeps it.

Fixes bytedance#5681
ethan-jiang-1 pushed a commit to ethan-jiang-1/deer-flow that referenced this pull request Sep 25, 2026
锚点 bytedance#6 (v2.1.0-rc0, 769589e) → bytedance#7 (v2.1.0, 345f08b),10 commits / 90 files。
注意 v2.1.0 tag 打在 2.1.x-dev 上,与 upstream/main 已在 rc0 处分叉(main 另有 189 commits 待 sync bytedance#8)。

源码侧实质变更 → digest 校正:
- 0025_repair_run_change_seq(bytedance#5517/bytedance#5516):修复被"插队"的 0023_run_change_seq
  留下的 schema 空洞;补注册 RunChangeClockRow / UserPreferenceRow
- 线程删除全量清理(bytedance#5535):DELETE /api/threads/{id} 持 durable delete reservation,
  依次清理文件系统/checkpoints/历史 run(只删 operation_kind="run")/events/feedback/thread_meta
- 事件存储变更串行域 + owner-scoped 删除签名(bytedance#5535)
- CI:6 个 workflow push 触发改 *-dev 通配,skill-review-ci 显式钉 2.1.x-dev(bytedance#5765)
- frontend:Projects 侧栏嵌套 SidebarMenu 加 w-auto(bytedance#5681/bytedance#5682)
- 文档:subagents 11 页手册 / extensions 10 页手册,root AGENTS.md 精简

同时校正文档侧漂移:AGENTS.md 行号引用与计数、仓库行数/方法数、
_faq_on_digested 14 处基线标注 rc0→v2.1.0。

SYNC.md / SYNC_LOG.md bytedance#7 / UPDATE_PLAN_7.md 已同步记录。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Next.js frontend under frontend/ risk:medium Medium risk: regular code changes size/M PR changes 100-300 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Project-grouped chat rows push their kebab menu button outside the sidebar

2 participants