Skip to content

Use short names for grouped projects#4138

Open
unknown6003 wants to merge 1 commit into
pingdotgg:mainfrom
unknown6003:agent/short-project-group-labels
Open

Use short names for grouped projects#4138
unknown6003 wants to merge 1 commit into
pingdotgg:mainfrom
unknown6003:agent/short-project-group-labels

Conversation

@unknown6003

@unknown6003 unknown6003 commented Jul 18, 2026

Copy link
Copy Markdown

What Changed

  • Keep matching repositories grouped across devices and environments.
  • Prefer the shared repository name for grouped sidebar labels, while preserving the owner-qualified display name and project title as fallbacks.

Why

Repository grouping correctly uses a canonical remote identity, but the group label preferred displayName, which can include a repository owner. The repository identity already exposes the short name, so checking it first keeps cross-device grouping intact without showing the owner.

UI Changes

Before

Grouped project labels include the repository owner

After

Grouped project labels use only the repository name

Checks

  • vp test apps/web/src/environmentGrouping.test.ts apps/mobile/src/features/home/homeThreadList.test.ts (18 passed)
  • vp check
  • vp run typecheck

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • No animation or interaction change requires a video

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8692d29b-d32a-4574-8574-f73a55696aca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jul 18, 2026
@unknown6003
unknown6003 force-pushed the agent/short-project-group-labels branch 5 times, most recently from b3d6acf to 923bc2f Compare July 18, 2026 21:02
@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Jul 18, 2026
@unknown6003
unknown6003 force-pushed the agent/short-project-group-labels branch from 923bc2f to 93f2851 Compare July 18, 2026 21:03
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Jul 18, 2026
@unknown6003
unknown6003 marked this pull request as ready for review July 18, 2026 21:21
@macroscopeapp

macroscopeapp Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

Multiple unresolved review comments identify that this change can cause ambiguous project labels when different repositories share the same short name (e.g., both org/app and user/app showing as 'app'). These substantive concerns warrant human review.

You can customize Macroscope's approvability policy. Learn more.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 93f285159e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

input.members.map((member) => member.repositoryIdentity?.name),
);
if (sharedRepositoryNames.length === 1) {
return sharedRepositoryNames[0]!;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Disambiguate colliding short repository labels

When two distinct canonical repositories with the same basename are each grouped across environments (for example, org/app and user/app), this returns app for both groups. Both the web sidebar and mobile home list call deriveProjectGroupLabel independently per group, so users can no longer distinguish the rows or their new-thread targets; the previous qualified displayName kept them distinct. Prefer the short name only when it does not collide with another visible repository group, or retain a qualified fallback for collisions.

Useful? React with 👍 / 👎.

@unknown6003
unknown6003 force-pushed the agent/short-project-group-labels branch from 93f2851 to 6435959 Compare July 18, 2026 22:27
@macroscopeapp
macroscopeapp Bot dismissed their stale review July 18, 2026 22:27

Dismissing prior approval to re-evaluate 6435959

Comment thread apps/mobile/src/features/home/homeThreadList.ts Outdated
Comment thread apps/mobile/src/features/home/homeThreadList.ts Outdated
Comment thread packages/client-runtime/src/state/projectGrouping.ts Outdated
@unknown6003
unknown6003 force-pushed the agent/short-project-group-labels branch from 6435959 to 0d49c21 Compare July 18, 2026 22:33
Comment thread packages/client-runtime/src/state/projectGrouping.ts Outdated
(project) =>
project.title.toLocaleLowerCase().includes(query) ||
project.repositoryIdentity?.displayName?.toLocaleLowerCase().includes(query),
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Search skips repository short name

Low Severity

Home search was extended to match repositoryIdentity.displayName, but not repositoryIdentity.name. When a name conflict yields a workspace title label instead of a short or qualified name, queries matching only the repo short name may not match the group even though threads exist.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0d49c21. Configure here.

const query = input.searchQuery.trim().toLocaleLowerCase();
const visibleProjects = [...groups.values()]
.filter((group) => group.threads.length > 0 || group.pendingTasks.length > 0)
.flatMap((group) => group.projects);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Inactive repos skip collision scan

Medium Severity

Mobile builds visibleProjects only from home groups that already have threads or pending tasks. Another loaded repository with the same short name but no home activity is omitted, so deriveProjectGroupLabel treats the name as unique and shows an ambiguous short label while web includes that repository in its collision scan.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0d49c21. Configure here.

@unknown6003
unknown6003 force-pushed the agent/short-project-group-labels branch from 0d49c21 to e330656 Compare July 18, 2026 22:40
Comment thread apps/mobile/src/features/home/homeThreadList.ts Outdated
@unknown6003
unknown6003 force-pushed the agent/short-project-group-labels branch from e330656 to 9082dfb Compare July 18, 2026 22:43
@unknown6003
unknown6003 force-pushed the agent/short-project-group-labels branch from 9082dfb to a9bbbc4 Compare July 18, 2026 23:39

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a9bbbc4. Configure here.

if (sharedDisplayNames.length === 1) {
return sharedDisplayNames[0]!;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ambiguous short labels across groups

Medium Severity

The deriveProjectGroupLabel function now uses the short repository name for a group's label if all its members share it. This check is limited to the group's members and doesn't consider other visible project groups. As a result, distinct project groups (e.g., org/app and user/app) can both be labeled app in the sidebar and home thread list, leading to ambiguity where qualified labels are expected.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a9bbbc4. Configure here.

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

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant