linux: close tab variants and 5 more action handlers#242
Conversation
- Close tab modes: THIS (current), OTHER (all but current), RIGHT (all tabs right of current). Previously only closed current tab. - Add TOGGLE_TAB_OVERVIEW stub (needs AdwTabOverview widget) - Add TOGGLE_WINDOW_DECORATIONS (toggle CSD via gtk_window_set_decorated) - Add MOUSE_OVER_LINK (pointer cursor on hoverable links) - Add PROGRESS_REPORT (store shell integration progress on Panel) - Add SCROLLBAR (accept scrollbar state, rendering deferred) - Add progress_state/progress_value fields to Panel struct Action coverage: 34 of ~45 ghostty runtime actions.
Greptile SummaryThis PR expands the Confidence Score: 5/5Safe to merge; only a single P2 defensive-programming suggestion remains. All prior P1 findings from the thread are resolved. The one new finding (unclamped @intcast in handleProgressReport) is P2 — it only triggers if libghostty delivers an out-of-spec value > 255 for an OSC 9;4 field defined as 0–100, which is not expected in practice. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[onAction callback] --> B{action.tag}
B --> C[CLOSE_TAB]
B --> D[TOGGLE_TAB_OVERVIEW\nstub → false]
B --> E[TOGGLE_WINDOW_DECORATIONS\ngtk_window_set_decorated]
B --> F[MOUSE_OVER_LINK\nset pointer cursor]
B --> G[PROGRESS_REPORT\nstore on Panel]
B --> H[SCROLLBAR\nno-op → false]
C --> C1{close mode}
C1 -->|THIS| C2[closeWorkspace current]
C1 -->|OTHER| C3[close all ≠ current\nreverse iterate]
C1 -->|RIGHT| C4[close current+1 to end\nreverse iterate]
G --> G1[find Panel by widget]
G1 --> G2[panel.progress_state = report.state]
G2 --> G3[panel.progress_value = clamp 0-100]
Reviews (2): Last reviewed commit: "fix: address Greptile P2 findings on PR ..." | Re-trigger Greptile |
- Use ?u8 instead of i8 sentinel for progress_value (idiomatic Zig) - Return false from handleScrollbar (don't suppress libghostty fallback) - Log Wayland CSD caveat in handleToggleWindowDecorations
Summary
CLOSE_TABto support all three ghostty close modes:THIS— close current tab (existing behavior)OTHER— close all tabs except currentRIGHT— close all tabs to the right of currentTOGGLE_TAB_OVERVIEWstub (returns false until AdwTabOverview widget is added)TOGGLE_WINDOW_DECORATIONS— toggle CSD viagtk_window_set_decoratedMOUSE_OVER_LINK— set pointer cursor when hovering clickable linksPROGRESS_REPORT— store shell integration progress (OSC 9;4) on PanelSCROLLBAR— accept scrollbar state (rendering deferred)progress_state/progress_valuefields to Panel structAction coverage: 34 of ~45 ghostty runtime actions.
Test plan