Repository navigation
Pin and highlight the original prompt in a pane #207
Replies: 2 comments 1 reply
|
Thanks — this was a really well-posed request, and you guessed the implementation almost exactly right. All four shipped in v2.4.0. To your question first: yes, all three are feasible with the xterm setup, and by the route you suggested. 1 is One producer, four viewsThe thing all four have in common is that they need exactly one fact: where a user prompt starts. So rather than four detectors, wmux now has one prompt log per pane and four independent views over it. Two sources feed it, ranked and never merged:
There is deliberately no heuristic third source. With neither present the log stays empty and every view is simply inert. A mis-detected boundary would pin the wrong text and anchor the view to the wrong line, and you'd have no way to tell it had happened — an honest "nothing yet" is better. Nice side effect of using the standard: if you already run Starship, oh-my-posh or bash-preexec with prompt marks configured, the shell half works with no wmux-specific setup at all. What you getEverything is under Settings → Prompts, each on its own switch, as you asked:
Plus On the one default I did not make universal: anchoring applies to agent answers only unless you switch it to "agent answers and shell commands". A shell following its own output isn't the problem you describe — it's what every terminal has done for forty years, and silently holding Two things worth writing downBoth were found by an adversarial review pass after the first version was "done", and both are the kind of thing that looks fine and isn't: The anchor has to be armed before it can be engaged. A prompt is submitted at the bottom of the buffer, so bash needs a doubled backslash for the OSC terminator inside While in there, the PowerShell integration also started reporting the Known limits, stated plainly
Bounded on purpose: 200 prompts per pane, 64 panes, 4000 characters per prompt, nothing persisted to disk, and a closed pane's log is dropped immediately. Give it a try and tell me what's wrong with it — particularly the anchor, which is the one that changes behaviour rather than just adding pixels. If the agent-only default turns out to be the wrong call I'd rather hear it than guess. |
|
Both fixed, and shipped in v2.5.0. Thank you for the second one especially — it was a real bug and a much more interesting one than it looks. The highlight colourYou were right that something was broken, but not in the way it appears: the colour you picked was being applied perfectly the whole time. It just could not be seen. Both halves of the pipeline checked out in isolation — the CSS resolved the exact colour, the picker wrote it to the store, the store reached the decoration — which is why "I tried a couple of colours and restarted" produced no change. Nothing was ignoring your setting. The cause is structural. xterm gives its decoration container And at 12% over a dark terminal background, every hue collapses to the same near-neutral grey. Blue, red and green all land within a few RGB points of each other. So the low alpha was a workaround for the layering being wrong, and it quietly ate the entire feature. Your "it's always the default grey" was precisely accurate — it was always a grey, just a slightly different one each time. The fix is to stop pretending. The tint now goes to the renderer, as the decoration's One trap worth recording, since it cost me a round of testing: xterm ignores the alpha channel on a decoration background. The rail also widens 2px → 4px. It is now the one element showing your colour at full saturation, and at 2px on the far-left edge it was easy to miss entirely. Two notes on the edges:
The reason this shipped at all: the test fake answered The outline as a surfaceAgreed, and done — this was the right call. There is now a Three ways to get one: wmux new-surface --type prompts # a tab in the current pane
wmux split --type prompts # straight into a pane beside the terminal…plus the tab bar's I kept the overlay rather than replacing it, because I think they genuinely answer different questions — an overlay is right for a glance and wrong for anything you keep open, which is exactly the complaint you raised. The setting defaults to The one thing a pane needs that the overlay never did is knowing which terminal to list, since it no longer sits inside one. It follows the last terminal to hold focus, and the 🔓 button in its header pins it to one — worth having the moment you have two terminals and want to watch one while typing in the other. Focus landing on anything that isn't a terminal deliberately doesn't change what it's showing, so clicking into the panel to filter or scroll it doesn't blank the list you just reached for. Rows there also wrap to two lines and show their source ( No screenshot needed in the end — the z-index behaviour reproduced cleanly against real xterm + WebGL, which is what made it findable. But do tell me how the 26% reads on your colour scheme; that number is a judgement call, and if it's too strong or too weak on a light theme I'd rather hear it than guess. |
Uh oh!
There was an error while loading. Please reload this page.
When running Claude Code (or any agent) in a wmux pane, the prompt I typed quickly scrolls out of view as the agent produces output. The output itself is often cluttered, and when skimming it's hard to tell where one exchange ends and the next begins. I'd love to see options for a clearer, more structured presentation – ideally all of them individually configurable, so everyone can pick what fits their workflow. Curious what you think.
Four related ideas:
Every one of these should be opt-in and adjustable in the settings (on/off, colors, position, shortcuts), so the default experience stays unchanged for people who don't need them. These would be awesome features for me!
Would the first three be feasible with the xterm.js setup, e.g. as a decoration/overlay and a scroll-lock mode?
The fourth could probably build on the same prompt-boundary detection.
Thanks for building wmux!
All reactions