protocol: answer OSC 4 palette queries from the window's configured palette #159
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis#159
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Raised on the GitHub mirror by an embedder that draws its own palette (https://github.com/felis-terminal/felis/issues/3); felis's own window has the same gap.
Problem
OSC 4 ; n ; ?answers a program's own override, else the compiled-in xterm palette (crates/felis-grid/src/osc_dispatch.rs,default_palette_color). A window with[theme.palette]/[theme.palette.indexed]configured draws different colors from the ones the program is told, so a program that reads the palette to pick readable colors (Claude Code does) picks against colors nobody sees.OSC 10/11/12 ; ?had the same bug and was fixed by the client reporting its resolved fg/bg/cursor inConfigureTheme, resolved along the window candidate chain (docs/explanation/architecture/session-lifecycle.md"Client-derived presentation state"). The palette was not part of that fix: the report predates[theme.palette]covering all 256 slots, and the later window-chain change did not revisit it.The recorded stance and why it does not hold
docs/explanation/architecture/session-lifecycle.md"Why not the last reporter, or a palette per window" ends "that is also why palette entries stay producer-only". The argument there rejects a per-window palette (each mirror its own view), which the chain does not need: the chain picks one window, exactly as it does for fg/bg.docs/explanation/security-model.md"One named carve-out" keeps the 256-slot query "purely reflective". The palette a window would report is a color set the user configured, from a window attached to this session, in a felis-generated reply: the same containment the carve-out already accepts for fg/bg/cursor.docs/reference/spec.mdREQ-900a states "palette entries (OSC 4 / 5) have no client-derived fallback".Direction
ConfigureThemecarries the window's configured palette entries (sparse: only the slots the config sets), added as a field under the minor ledger; it stays one atomic report per window and travels the existing chain.set_theme_config_default. An embedder without a daemon calls it directly, which is what the GitHub request asks for.OSC 104and RIS still reset to the layer below the program's overrides, i.e. to the window's palette.docs/reference/ipc.mdConfigureTheme.