feat(web): add file tree expand all controls - #12
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dcc458b3a8
ℹ️ 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".
| aria-label={ | ||
| allDirectoriesExpanded ? "Collapse all folders" : "Expand all folders" | ||
| } | ||
| onClick={toggleAllDirectories} |
There was a problem hiding this comment.
Add the expand-all control to the mobile file tree
This adds the action only to the web file browser, while mobile has an equivalent FileTreeBrowser that maintains expandedPaths and currently exposes only per-directory toggles (apps/mobile/src/features/files/FileTreeBrowser.tsx:118-194). Consequently, users controlling the same project from mobile cannot access the new expand/collapse-all behavior; add the equivalent mobile action or explicitly establish why that client is unsupported.
AGENTS.md reference: AGENTS.md:L67-L70
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Z3/apps/web/src/components/files/FileBrowserPanel.tsx
Lines 268 to 270 in 4c474cc
This commit exposes new expand-all/collapse-all behavior in both the web and mobile file browsers, but it does not update any docs/user/ page, so users have no shipped documentation for discovering or understanding the new controls. Add the behavior to the appropriate user guide, as required for user-visible changes.
AGENTS.md reference: AGENTS.md:L73-L75
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53067e9ffd
ℹ️ 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".
| const toggleAllDirectories = useCallback(() => { | ||
| setExpandedPaths(allDirectoriesExpanded ? new Set() : new Set(directoryPaths)); | ||
| }, [allDirectoriesExpanded, directoryPaths]); |
There was a problem hiding this comment.
Preserve collapse-all across entry refreshes
When a user collapses all folders and the entries are subsequently refreshed or changed, this sets expandedPaths to an empty set, but the initialization effect treats any empty set as uninitialized when the new tree produces a new defaultExpanded value and automatically reopens every top-level folder. Track whether default expansion has already been initialized separately from expandedPaths.size so a deliberate collapse-all remains collapsed after a refresh.
Useful? React with 👍 / 👎.
Summary
Add an accessible expand-all/collapse-all control to the file browser and keep the action idempotent for already-expanded folders.
Validation
Upstream reference: pingdotgg/t3code#8889