Float mode: overlay a pane on the origin session as a felis run transient #4

Open
opened 2026-09-25 19:45:43 +09:00 by natsukium · 0 comments
Owner

Add a float mode: felis-tui launched as a felis run transient shows the origin session live in the background and a
floating pane on top, like tmux display-popup.

Intended use is a keymap binding such as:

# felis config.toml
"ctrl+shift+g" = { kind = "run", command = ["felis", "frontend", "tui", "--float", "--", "lazygit"] }

felis already supplies what the launch needs: the transient's environment carries FELIS_ORIGIN_SESSION_ID and
FELIS_HOST, and the transient's exit returns the window to the origin with its viewport restored. Because the
background is a live ShadowScreen mirror and the float is an ordinary daemon session, neither needs a felis-side
change, and the "never re-parse a PTY byte stream" non-goal holds.

Work

  • Overlap in the compositor/layout. compositor.rs and layout.rs assume non-overlapping tiles; a float needs a
    z-ordered rect painted over a full-host background pane.
  • Launch mode. Attach the background pane to $FELIS_ORIGIN_SESSION_ID (over $FELIS_HOST when set), spawn the
    float session running <cmd>, and exit when the float session ends. This bypasses the current "first pane
    re-attaches a parked session" path.
  • Kitty graphics occlusion. A background image under the float cannot be clipped to a rect with a hole. Candidate:
    re-emit background placements with a z-index below -1073741824 (drawn under non-default-background cells) and
    always paint float cells with a non-default background. Unverified.
  • Scope. docs/non-goals.md limits felis-tui to environments without a first-class WM; float is useful inside the
    felis GUI too, so that paragraph needs to admit the transient-overlay use.
Add a float mode: felis-tui launched as a felis `run` transient shows the origin session live in the background and a floating pane on top, like tmux `display-popup`. Intended use is a keymap binding such as: ```toml # felis config.toml "ctrl+shift+g" = { kind = "run", command = ["felis", "frontend", "tui", "--float", "--", "lazygit"] } ``` felis already supplies what the launch needs: the transient's environment carries `FELIS_ORIGIN_SESSION_ID` and `FELIS_HOST`, and the transient's exit returns the window to the origin with its viewport restored. Because the background is a live `ShadowScreen` mirror and the float is an ordinary daemon session, neither needs a felis-side change, and the "never re-parse a PTY byte stream" non-goal holds. ## Work - **Overlap in the compositor/layout.** `compositor.rs` and `layout.rs` assume non-overlapping tiles; a float needs a z-ordered rect painted over a full-host background pane. - **Launch mode.** Attach the background pane to `$FELIS_ORIGIN_SESSION_ID` (over `$FELIS_HOST` when set), spawn the float session running `<cmd>`, and exit when the float session ends. This bypasses the current "first pane re-attaches a parked session" path. - **Kitty graphics occlusion.** A background image under the float cannot be clipped to a rect with a hole. Candidate: re-emit background placements with a z-index below `-1073741824` (drawn under non-default-background cells) and always paint float cells with a non-default background. Unverified. - **Scope.** `docs/non-goals.md` limits felis-tui to environments without a first-class WM; float is useful inside the felis GUI too, so that paragraph needs to admit the transient-overlay use.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
natsukium/felis-tui#4
No description provided.