session.hud: allow arbitrary placement, not just vertical #384
Replies: 6 comments
|
the placement ask makes sense on its own and it's cheap. one caveat on the always-visible part.
if your renderer already polls one thing a corner won't fix either: the panel is opaque and takes 10-80% of the pane width, so also worth checking whether you need the panel at all for this. the text color footnote is fair, noted separately. |
|
merged in #386, on master and in the next release. it went wider than the four corners:
the text color footnote is in as the caveats from my earlier reply are unchanged, none of them being about placement. |
|
@umputun follow-up to the placement work here, one level down nine anchors reoslve against the whole session rect, not the caller's pane. in a split, this looks untidy and plainly misaligned: an agent in the left pane asks for bottom-right, and the panel lands over the right pane, on top of whatever is running there. the same happens in reverse and on both split axes. none of this is wrong once you know the panel goes through the session-wide overlay slot, but until then it looks like a drawing bug rather than a deliberate anchor. is there a reason anchors could not resolve against the caller's pane, opt-in, say --pane on hud open? |
|
merged in #536, which carries the detail. what I decided: placement can now be pane-relative if you ask for it, but the panel did not become what shipped: for a long-running agent use a resident panel per agent is a separate feature rather than a later increment of this one. |
|
@umputun thanks, tried fix and the pane-scoped anchor is offset by the pane's window origin. agterm 0.26.3 (7eb1c1e), macOS 15.7.9, with a visible sidebar and a side-by-side split. from the left pane: the pane center is x=663, but the hud center is x=908, a 245-246 pt shift equal to the sidebar plus divider. the expected bottom margin is 100 pt, but the actual margin is 51 pt, a 49 pt shift equal to the titlebar plus hairline. the width is correct at 29% of the pane. the pane probe is in |
|
merged in #545, on master and in the next release. your diagnosis is the cause. the fix drops the named space and carries the pane bounds as two hosted tests mount the panes behind a sidebar and a titlebar, and putting the leak back fails them by exactly those offsets. There is still no test of where the panel actually draws, which is how this got through: the HUD is a Metal surface with no XCUIElement, so that needs a screenshot comparison and is separate work. |
Uh oh!
There was an error while loading. Please reload this page.
What I'm trying to do
Keep a small, always-visible recap panel over each session — the task in one line and the current state in another — so that walking into any of a dozen agent sessions answers "what is this about and where does it stand" at a glance.
session hudis very close to the right primitive for this. It is passive (the session keeps first responder and stays typable), it updates in place without blinking, and it does not consume the split. That combination is exactly what a status panel needs, and nothing else in the API offers it.The gap
--positionaccepts onlytop,centerandbottom. A panel meant to sit there permanently has to live in the reading path:centercovers the conversation,topsits directly over the newest output, which is where the eye is.The natural home for a persistent status panel is a corner — out of the text flow, present without competing for attention.
What would help
Horizontal placement alongside the existing vertical one, e.g.
--position top-right/top-left/bottom-right/bottom-left, matching the anchor vocabularysession background --positionalready uses. Reusing that exact set would keep the two consistent.What I tried instead, and why it did not work
session background text— behind the terminal, so it does not steal input and can be corner-anchored, but it is a watermark rather than a panel: no frame, no separation from the text above it.session split onmoves focus to the new pane and returning it is a separate call, so there is a window in which typing goes to the panel. With the panel re-asserted on every agent turn, that window is hit often enough to be disruptive.visible=false, active=false, so it is unusable for anything persistent.So
session hudis the only mechanism with the right behaviour; placement is the one thing keeping it from the job.Notes
Text colour inside the panel is not settable either. It is workable via
--background-color(a light panel on a light theme keeps the text readable), so this is a footnote rather than part of the request — mentioning it only in case the two are worth considering together.agterm 0.21.0, macOS 26.
All reactions