Skip to content

feat(sidebar): add folder context menu and empty group placeholders#3133

Open
MattPua wants to merge 3 commits into
mainfrom
posthog-code/keep-folders-open-without-active-tasks
Open

feat(sidebar): add folder context menu and empty group placeholders#3133
MattPua wants to merge 3 commits into
mainfrom
posthog-code/keep-folders-open-without-active-tasks

Conversation

@MattPua

@MattPua MattPua commented Jul 3, 2026

Copy link
Copy Markdown
Member

Problem

Folders without tasks were invisible in by-project mode, and there was no way to add/remove folders from the sidebar.

Needed a way to quickly open tasks with a specific project because i often forget to change it when starting a new task via the dropdown.

Changes

CleanShot.2026-07-03.at.13.40.16.mp4
  • Empty folders now show in by-project mode with a "No agents yet" placeholder
  • Right-click a folder header to remove it or open in external app
  • Add folder button in the tasks header opens the OS directory picker
  • Extracted folderGroupId so folder↔group matching logic lives in one place

How did you test this?

Manual testing in the app.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@trunk-io

trunk-io Bot commented Jul 3, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit ab01fc1.

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. packages/core/src/sidebar/groupTasks.ts, line 100-106 (link)

    P2 Disambiguation silently no-ops for empty folder groups

    The organization is sourced from group.tasks[0]?.repository?.organization, which is always undefined for the new empty placeholder groups (tasks: []). If a user has two workspace folders with the same display name but no active tasks in either, both groups render with identical labels and the user has no way to tell them apart. The same gap applies to non-remote folders in general (where getRepositoryInfo never sets organization), but those groups at least had tasks before; the empty-group feature makes the collision much easier to hit.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "feat(sidebar): add folder context menu a..." | Re-trigger Greptile

Comment thread packages/ui/src/features/sidebar/components/SidebarMenu.tsx
Comment thread packages/ui/src/features/sidebar/components/TasksHeader.tsx Outdated
- Add toast on folder context menu action failure
- Remove misused aria-busy from button element

Generated-By: PostHog Code
Task-Id: c24a31b4-54a1-4f5f-8092-ac1ee33ace07
@MattPua MattPua marked this pull request as ready for review July 3, 2026 17:41
Generated-By: PostHog Code
Task-Id: c24a31b4-54a1-4f5f-8092-ac1ee33ace07
@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "fix(sidebar): say "No tasks yet" instead..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant