Skip to content

fix(app): restore project rename entry and harden sidebar against nested interactives#544

Merged
Astro-Han merged 4 commits into
devfrom
fix/project-rename-entry
May 11, 2026
Merged

fix(app): restore project rename entry and harden sidebar against nested interactives#544
Astro-Han merged 4 commits into
devfrom
fix/project-rename-entry

Conversation

@Astro-Han
Copy link
Copy Markdown
Owner

Summary

Restore the PawWork sidebar project rename/remove entry points and harden the sidebar against nested interactive controls.

This PR:

  • Adds missing project action i18n keys for rename, remove/hide, undo, and failure toasts.
  • Splits the project group collapse button and overflow menu button into sibling controls via a local ProjectGroupHeader component.
  • Adds a sidebar invariant test that fails when interactive JSX controls are nested inside other interactive controls.
  • Extends the project sidebar E2E coverage for overflow menu, right-click context menu, translated rename dialog copy, and rename persistence.

Why

Task #18 reported that the installed app could not rename a left-sidebar workspace/project and that the rename dialog looked wrong.

RCA found two regressions from PR #517 / commit def93393c:

  • The project group header nested DropdownMenu.Trigger as={IconButton} inside the collapse <button>, creating invalid button-inside-button DOM. Desktop WebView event/focus handling made the project menu entry unreliable.
  • Project rename/remove keys were referenced in code but missing from en.ts and zh.ts, so the dialog/menu copy could show raw keys if the entry point opened.

Related Issue

Task #18.

Human Review Status

Pending. A human should make the final merge decision after reviewing the final diff and verification evidence.

Review Focus

  • ProjectGroupHeader structure: the group toggle and project menu trigger must remain siblings, not nested controls.
  • Sidebar invariant test coverage: it should catch future nested interactive controls without introducing a new lint mechanism.
  • E2E coverage for project overflow menu, right-click context menu, translated dialog title, and renamed header persistence.
  • i18n wording for remove/hide semantics: project removal hides the project from the sidebar and can be undone.

Risk Notes

Low-to-medium UI risk. The behavior change is scoped to project group headers in the PawWork sidebar. Session row and workspace row behavior are intentionally untouched. The remove action remains hide-from-sidebar, not file deletion.

No dependency, permission, packaging, migration, or generated-file changes.

How To Verify

Typecheck: passed (`bun --cwd packages/app typecheck`)
Unit/invariant: 1045 passed, 0 failed (`bun --cwd packages/app test:unit -- src/pages/layout/sidebar-interactive-invariant.test.ts`)
Project sidebar E2E: 3 passed (`bun --cwd packages/app test:e2e:local -- e2e/sidebar/sidebar-project-actions.spec.ts --project=chromium`)
Diff check: no whitespace errors (`git diff origin/dev --check`)

Screenshots or Recordings

Installed-app reproduction screenshots were uploaded in Slock thread #PawWork:2c7f3674:

  • Project group menu trigger visible: c8e7a5e8-0deb-467e-95f8-24e044d01a60
  • Clicking/right-clicking project group did not open the menu: 79bff17a-2f7e-4f02-8400-85c5142e64b9
  • Session rename dialog reference: 121cb679-c80a-4f3a-845b-a29cc16e71da

The focused E2E also captures the project header, opened menu, rename dialog, and post-rename state as Playwright artifacts.

Checklist

  • Human review status is stated above as pending, approved, or not required
  • I linked the related issue, or stated why there is no issue
  • This PR has type, primary area, and priority labels, or I requested maintainer labeling
  • I described the review focus and any meaningful risks
  • I listed the relevant verification steps and the key result for each
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope
  • I manually checked visible UI or copy changes when needed, with screenshots or recordings
  • I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes
  • I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant
  • I reviewed the final diff for unrelated changes and suspicious dependency changes
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@Astro-Han has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 30 minutes and 7 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fd7fdd7d-b24b-4b77-b11b-02f648e6b399

📥 Commits

Reviewing files that changed from the base of the PR and between 577233b and 1d1cc1b.

📒 Files selected for processing (6)
  • packages/app/e2e/selectors.ts
  • packages/app/e2e/sidebar/sidebar-project-actions.spec.ts
  • packages/app/src/i18n/en.ts
  • packages/app/src/i18n/zh.ts
  • packages/app/src/pages/layout/pawwork-sidebar.tsx
  • packages/app/src/pages/layout/sidebar-interactive-invariant.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/project-rename-entry

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Astro-Han Astro-Han added bug Something isn't working app Application behavior and product flows P1 High priority task Maintainer or agent execution task labels May 11, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces context menu support for project headers in the sidebar, allowing users to rename or remove projects via right-click. It refactors the sidebar implementation by extracting the ProjectGroupHeader component and updates the corresponding E2E tests and internationalization files for English and Chinese. Additionally, a new test suite was added to enforce an invariant against nesting interactive controls within the sidebar. I have no feedback to provide.

@Astro-Han Astro-Han merged commit df10ceb into dev May 11, 2026
22 checks passed
@Astro-Han Astro-Han deleted the fix/project-rename-entry branch May 11, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Application behavior and product flows bug Something isn't working P1 High priority task Maintainer or agent execution task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant