feat(folder-picker): show up to 10 recent repositories#2725
Open
richardsolomou wants to merge 2 commits into
Open
feat(folder-picker): show up to 10 recent repositories#2725richardsolomou wants to merge 2 commits into
richardsolomou wants to merge 2 commits into
Conversation
Bump the recent folders shown in the folder picker from 5 to 10 to better support teams working across many internal repos. Generated-By: PostHog Code Task-Id: c5d2c398-2356-4dcf-8bf8-26419318a723
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/ui/src/features/folder-picker/FolderPicker.tsx:50
The literal `10` is a magic number. Extracting it to a named constant would make the intent self-documenting and make future adjustments easier to find. Note also that `AdditionalDirectoriesButton.tsx` calls `getRecentFolders()` without an argument, so it still uses the old default of `5` — both limits now live implicitly in different files. A shared constant (or a consistent explicit call) would keep the two in sync.
```suggestion
const MAX_RECENT_FOLDERS = 10;
const recentFolders = getRecentFolders(MAX_RECENT_FOLDERS);
```
Reviews (1): Last reviewed commit: "feat(folder-picker): show up to 10 recen..." | Re-trigger Greptile |
Change the getRecentFolders default limit from 5 to 10 instead of overriding at the call site, so all consumers benefit consistently. Generated-By: PostHog Code Task-Id: c5d2c398-2356-4dcf-8bf8-26419318a723
Contributor
|
Reviews (2): Last reviewed commit: "refactor(folders): default recent folder..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
We work across a lot of repos internally, and the folder picker only surfaced the 5 most recent repositories — too limiting when switching between many.
Changes
Bumped the recent repositories shown in the folder picker's "Recent" list from 5 to 10 (
getRecentFolders(10)inFolderPicker.tsx).How did you test this?
Not manually tested beyond confirming the change. It's a one-line bump of an existing display limit.
Automatic notifications
Created with PostHog Code from a Slack thread