Repository navigation
Conversation
pane-grid (https://github.com/hwanyong/pane-grid) splits a Claude Code pane into cells and places grid-ready mods in them. filetree now joins it in the terminal: - hooks/pane-grid.ts is pane-grid's reading module, comments removed for scripts/ci/greps.sh - hooks/site.ts names where the tree draws: its own pane, or the grid pane of its cell, with that cell's columns and rows - the views read columns and rows from the site, so one renderPane draws both - a ui.render hook on grid panes fills the cell and lists filetree in empty cells; a state.set hook on pane-grid's layout closes the Files tab while placed and opens it again when the cell is emptied - ui.message, ui.focus and ui.scroll accept the grid pane of the cell; with pane-grid 0.4.0 the wheel scrolls the tree under its header - /filetree skips the fullscreen and width checks while placed and names the cell in its reply Without pane-grid installed every read is undefined and filetree behaves as before. The Desktop app keeps the tree in its own pane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQMofoXjiZ7a2qbMz3g1o1
Codex Review Summary: ✅ CompletedThis 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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQMofoXjiZ7a2qbMz3g1o1
…id's toolbar letters A Button hotkey drawn in a grid cell acts for the whole grid pane, and of two Buttons with one hotkey the engine presses the later drawn. The tree's hidden hotkeys took pane-grid's toolbar keys (c for a new tab, z for zoom), and the autoFocus Button of an inactive filetree cell sent digit keys to the prompt. - hooks/pane-grid.ts: TOOLBAR_KEYS from pane-grid 0.4.1's reading module - hooks/site.ts: Site.isActive, and takesKey() for the keys a site draws - hooks/footer.tsx: the hidden hotkeys and the autoFocus Button are drawn only while the site is active, and a cell leaves out TOOLBAR_KEYS - hooks/register.tsx: the Files pane is always active; a cell reads placement.isActive (true with a pane-grid that does not write it) - docs/sidebar.md: the key limits in a cell Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQMofoXjiZ7a2qbMz3g1o1
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1524c8b0a8
ℹ️ 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".
| <Box flexDirection="column" minHeight={Math.max(1, site.rows ?? 1)} backgroundColor={theme.bg || undefined}> | ||
| <Box flexDirection="row"> | ||
| <Button key="back" plain hotkey="h" autoFocus={settings.editWithSetting || machine.inTmux || machine.inHerdr ? undefined : true} label={unicode ? '← files' : '\u{ea9b} files'} onPress={() => void closePreview($)} /> |
There was a problem hiding this comment.
Apply the grid keyboard policy to full-preview controls
When a placed tree shows a full-file preview or diff, renderPane returns previewPane before reaching footerOf's takesKey filtering. The terminal preview consequently retains its hotkeys and autofocus controls even when site.isActive is false. Since hotkeys are pane-wide, keys intended for another active cell can still scroll or close the preview, and reserved k/b can override pane-grid's toolbar actions. Apply takesKey to the preview hotkeys and gate its autofocus controls with site.isActive, as the normal tree view does.
Useful? React with 👍 / 👎.
| export async function placeOwnPane($: EngineInterface, root: string, layout: unknown, previous: unknown): Promise<void> { | ||
| const isPlaced = placementIn(layout, PLUGIN) !== undefined | ||
| const isOpen = (await $.ui.panes()).some(pane => pane.id === PANE) | ||
| if (isPlaced && isOpen) return $.ui.close({ id: PANE }) |
There was a problem hiding this comment.
Preserve the standalone pane for Desktop surfaces
When a session with a terminal grid placement also draws on Desktop, pane-grid.layout is shared session state, so this closes the Files pane for Desktop too. openPane also refuses to reopen it while the placement exists, but the grid renderer explicitly returns below on non-terminal surfaces (hooks/register.tsx:364), leaving Desktop with no filetree at all. Keep the standalone pane available on unsupported surfaces instead of treating a terminal placement as a global replacement.
Useful? React with 👍 / 👎.
|
Thanks - I will take a look in more detail and get back to you in the coming days before releasing 0.9.0. Appreciate the PR! |
Hi, and thank you for filetree.
I maintain pane-grid, a Claude Code mod that splits one pane into a tmux-style grid of cells and places other mods in them. filetree is the mod I most wanted in a cell, so I'd like to propose this integration. It is entirely optional. Without pane-grid installed, filetree behaves exactly as it does today. If the approach doesn't fit how you want filetree to grow, I'm happy to rework it or close this.
What
In the terminal, with pane-grid installed:
filetreeas a choice, and/grid place filetreedraws the tree in a cell/grid place -)/filetreeskips the fullscreen and 110-column checks while placed, and names the cell in its replyThe Desktop app is unchanged. A grid cell there keeps drawing what pane-grid draws, and filetree stays in its own pane.
Why
pane-grid publishes where each placed mod goes in
$.state(pane-grid.layout). A mod reads that value and draws a keyedBox, so neither side imports the other. Some people keep several mods open at once (a tree, a usage gauge, a question list). A grid lets them share one sidebar instead of taking turns as tabs.How
hooks/pane-grid.tsis pane-grid's reading module (source). I removed its comments soscripts/ci/greps.shpasses. Every value it reads is checked at run time, so a missing or unexpectedpane-grid.layoutreads as "not placed"hooks/site.tsnames where the tree draws (Site: the pane id, columns and rows). It is either the Files pane, or the grid pane of filetree's cell with that cell's size.openPaneandfocusKeyskip the Files pane while placedsite.columnsandsite.rowsinstead ofe.props.bodyColumnsande.props.scroll.bodyRows, so onerenderPanedraws both. The treemap blit targetssite.idregister.tsxadds three hooks:ui.renderhook on/^grid-/panes that fills the cell or adds the choicestate.sethook onpane-grid.layoutthat closes or reopens the Files pane/^grid-/added to theui.focusandui.scrollmatchers, throughisSiteandisScrollInhotkeydrawn in a grid cell acts for the whole grid pane, and of two Buttons with one hotkey the engine presses the later drawn. So the hidden hotkeys and theautoFocusButton are drawn only while the cell is active (placement.isActive), and a cell leaves out the letters of pane-grid's toolbar (TOOLBAR_KEYS:v s o z x w b c k q).takesKeyinhooks/site.tsdecides this. The Files pane is always active, so nothing changes thererenderPaneinto the Files pane's own render hook, so it does not run for a grid cellREADME.mdlists the feature, anddocs/sidebar.mdhas a new "In a pane-grid cell" section with its limitsLimits
$.ui.focusacts only on a plugin's own sites, and the cell belongs to pane-grid's pane. Clicking the cell gives it the keyboardcandz) do nothing; pane-grid's toolbar keeps themChecks
claude plugin test .passes: 309 tests in 4 files.tsc -p tsconfig.json --noEmitpasses with TypeScript 5.9.3.oxlintpasses with 1.88.0 and tsgolint 7.0.2004.sh scripts/ci/greps.shpasses.sh scripts/ci/version.shandsh scripts/ci/version-test.shpass.claude plugin validate .passes. It listsstate reads: … pane-grid.layoutandstate.set{plugin=pane-grid, key=layout}.scripts/ci/jsx-sizes.tsnot run locally (no bun on this machine). I'm relying on CI for it.--plugin-dirload orders:/filetreewhile placedrelease/0.9.0, since this is a feature. The version is unchanged.ACKNOWLEDGEMENTS.mdline added. The PR link will follow in a follow-up commit, once this PR's number is known.Thank you for taking a look. Any feedback on naming, file layout or scope is very welcome.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BQMofoXjiZ7a2qbMz3g1o1