Merge upstream into multi-source (#390 / #391)#2
Merged
Conversation
fujibee#390) * feat(app): snap pane dividers to terminal cell units, herdr-style gaps Divider drags now snap to whole terminal columns/rows instead of free pixel positions — koit prefers the discrete, cell-aligned feel over a continuous drag. TerminalPane reports its actual cell size (px per col/row) on every fit; every pane shares the same fixed font today, so any one of them is representative for snapping math regardless of which two panes flank a given divider. The gap between panes is now derived from that same cell size (half a cell of padding per side, so two adjacent panes' padding sums to one full cell at the shared seam) instead of a fixed 4px/2px value — closer to herdr's look, and what koit was actually asking about when the old fixed gap read as narrower than herdr's. With the gap now wide enough to read clearly, the divider's own mid-gap hairline was redundant chrome — hidden by default, shown only on hover or while that SPECIFIC divider is being dragged (a class toggled on the divider element itself, not `resizing-col`/`row` on `body`, which is shared with the sidebar/chat dividers and would have lit up every same-axis pane divider during an unrelated drag). Also brightened the pane frame itself into its own `--pane-border` variable (koit: the shared `--border` was too faint to read as a visible box at rest) rather than changing `--border` globally, which 27 other rules also depend on. * fix(app): key the drag-highlight off divider identity, not a DOM ref co1 review (PR fujibee#390): the previous version toggled the highlight class directly on the grabbed divider's DOM element. For a 2x2 aligned grid that survives its own transpose, but a 3+ segment grid transposes into a different divider shape (grid-segment keys -> single keys), so React unmounts the original element mid-drag and the highlight silently disappears. dividerDragKey (now in paneTree.ts, pure and testable) computes a divider's identity as [...basePath, ...segmentPath] (or path directly for an already-single divider) — the same split node's path on both sides of the transpose, per transposeGrid's own doc. App.tsx now tracks the dragged divider by this key in state instead of a captured element, so the highlight survives regardless of which divider ends up rendering it.
* feat(app): persist UI settings across restarts Persist to localStorage: Show Team Room / Show User Chat toggles, terminal font size (now adjustable from Settings), sidebar collapse state, and window size/position/maximized state (via tauri-plugin-window-state). Also adds a "don't show again" suppression for the auto-triggered app-user prompt on team switch. Currently selected team was already persisted (LAST_TEAM_KEY); no change needed there. Pane split ratios are left for a follow-up. * fix(app): restore view toggles via lazy init, not a racy setState effect co1 review on fujibee#391: showTeamRoom/showUserChat started at `true` and were corrected by a mount effect's setState — but a persist effect keyed on the same state captured the initial-render's stale `true` first and wrote it back to localStorage, corrupting the saved value on every restart. Lazily restore both from localStorage instead, matching the sidebarCollapsed/terminalFontSize pattern; the seeding effect now only pushes the (already-correct) initial value into Rust. Also validates the restored terminal font size against the Settings modal's own range (8-24) rather than just `> 0`, so a corrupted/stale localStorage value can't reach xterm or persist itself back unchecked. * fix(app): re-report cell size after a live font-size change co1 rebase-delta review on fujibee#391: the font-size effect calls fit.fit() (which changes xterm's internal rows/cols) but never called onCellSize, so fujibee#390's divider snap/gap sizing stayed pinned to whatever font was active on the .term-pane container's last actual resize — the ResizeObserver that normally drives onCellSize doesn't fire for a font change, since the container's own offsetWidth/offsetHeight don't move.
Resolve the app-user prompt in the initial team load, where fujibee#391 (persist UI settings) and multi-source support both changed the same condition. Everything else merges cleanly. Keep both conditions. fujibee#391 adds a suppression flag so a dismissed prompt stays dismissed across restarts; multi-source narrows the check to the local source, since the composer writes locally and a member carrying APP_USER_TYPE on a read-only remote cannot stand in for a local app user. Take fujibee#391's auto flag on the modal. Verified on Windows: frontend 92 passed, tsc clean, Rust 51 passed. The macOS and bats legs run on the fork before this goes back to the PR — a Windows-only run cannot see cfg(not(windows)) code.
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.
upstream の fujibee#390 (pane divider) / fujibee#391 (persist UI settings) を取り込んで、衝突を解決した。fork 側で CI を通すのと、fork のデフォルトブランチを最新に追いつかせるのを兼ねる。
衝突は
app/src/App.tsxの app-user プロンプト条件 1 ヶ所のみ。fujibee#391 の抑制フラグと、複数 source の「local だけを見る」条件の両方を残した。read-only な remote 上の APP_USER_TYPE メンバーは、composer がローカルへ書く以上、ローカルの app user の代わりにはならない。Windows ローカル: frontend 92 / tsc / Rust 51 通過。macOS と bats はここで確認する。