Skip to content

fix(web): show the session added/deleted banner above the tabs (#188) - #189

Merged
lionello merged 1 commit into
masterfrom
fix/msg-above-tabs
Aug 5, 2026
Merged

fix(web): show the session added/deleted banner above the tabs (#188)#189
lionello merged 1 commit into
masterfrom
fix/msg-above-tabs

Conversation

@defangdevs

Copy link
Copy Markdown
Owner

Closes #188.

Motivation

On the workspace, #msg-slot sat between the tab bar (plus the add-session
editor that drops out of it) and the terminal panes. Two problems with that
spot:

  • it reads as a message from the session in the pane below it, not as
    feedback about the workspace — the banner is page-level ("Session added —
    it starts within a few seconds.", "Session deleted.");
  • it prised the tab bar away from the terminal it labels and pushed the pane
    down by the banner's height every time a session came or went.

Change

<div id="msg-slot"> is now the first element in <body class="ws">, above
<nav class="tabs">. Nothing else moved.

  • No JS change: applyDoc swaps the slot by id, in place after a POST,
    so the client-side add/delete path picks up the new position for free.
  • No CSS change: .msg is unchanged, and an empty #msg-slot has no box of
    its own — with no message the tab bar still sits flush with the top of the
    viewport.
  • The settings page (BODY) already had the banner at the top under the
    <h1>; untouched.

Rendered before/after on a local daemon (fake sessions.json, no live
session so the pane is the placeholder), GET /?ok=session_added:

order down the page
before tabs → banner → pane
after banner → tabs → pane

User-visible / security effects

Purely cosmetic ordering of server-rendered HTML on the authenticated
workspace page. No new routes, no change to what is rendered or to any
message text; nothing about auth, secrets, or session state is touched.

Regression coverage

tests/sessions.nix (workspace subtest) now asserts:

  • <div id="msg-slot"></div> — the slot is empty when there is no message;
  • on GET /?ok=session_added, class="msg" appears before
    id="tab-bar" in the response.

Checks run

On this aarch64 box (the VM tests are x86-only, so sessions runs in CI):

  • nix build -L .#checks.aarch64-linux.module-generated-up-to-date — pass
    (modules/agent-box.nix regenerated with nix run .#assemble and
    committed).
  • nix build -L .#checks.aarch64-linux.multi-user — pass.
  • Manual: ran the assembled settings daemon locally in AGENT_BOX_HOME=1
    mode and fetched /?ok=session_added — banner renders above #tab-bar;
    / renders the empty slot.

No AWS cost, IAM, networking, or migration impact.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DgzpJfHzh52tmjvW6tkEQK

The "Session added"/"Session deleted" banner rendered between the tab
bar and the terminal pane, which reads as a message from the session in
that pane rather than as feedback about the workspace — and it prised
the tab bar away from the terminal it labels, shifting the pane down by
the height of the banner every time a session came or went.

It is page-level feedback, so it now renders first, above the tabs. The
slot stays where it was in the id list SCRIPT swaps after a POST
(applyDoc replaces by id, in place), so the client-side path needs no
change, and an empty slot has no box of its own — with no message the
tabs still sit flush with the top of the viewport.

Covered by tests/sessions.nix: the workspace renders the banner before
the tab bar, and the slot is empty when there is nothing to say.

Closes #188

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DgzpJfHzh52tmjvW6tkEQK
@lionello
lionello merged commit 153e5d2 into master Aug 5, 2026
1 check passed
@lionello
lionello deleted the fix/msg-above-tabs branch August 5, 2026 14:37
defangdevs added a commit that referenced this pull request Aug 6, 2026
…essions

The standing watch on this box put four hook-* sessions on defangdevs/agent-box
this afternoon for a repo with nothing wrong: merging #189 emitted a green
check_run.completed per job, a green workflow_run, a Pages deployment, and a run
the concurrency group cancelled. Each session read CI, concluded "nothing to do",
and held one of the four hook-session slots that a real failure needs.

0.10.0 was supposed to have stopped that — its own tool description, INSTRUCTIONS
and the agent-box-webhook --deliver-to help all say a CI event spawns only on a
FAILURE. The implementation only used the outcome to decide whether a CI event
could override ignoreSenders, so with the sender not on the ignore list nothing
was gated. An ignore list names the box's own identity (`defangdevs`), while CI
is triggered by whoever pushed (`lionello`), so on this box the brake was never
reached. local-channels 0.10.1 moves the verdict into dispatch_event: a CI
outcome that is not a terminal failure never spawns, whoever triggered it. A
failure still overrides an ignored sender, and session delivery is untouched.

- `webhook.rev` / `webhook.sha256` → local-channels aec22b5 (0.10.1), and
  `modules/agent-box.nix` regenerated from the `.in` source.
- `tests/webhook.nix` gains a leg for it, placed where neither other brake can
  explain the result: the owning session has already handed the topic back and
  the sender is on no ignore list, so only the outcome can hold the spawn. It
  asserts the suppression log line and that no hook-* session appears — the leg
  fails against a pre-0.10.1 pin, which is what makes it a pin test.

Not covered here: the session plugin cache still carries its own copy of
webhook.py (#193), so a session's MCP peer keeps running 0.10.0 until that is
bumped too. Only the dispatcher's copy decides spawns, so the box gets the fix
from this pin alone.

## Verification

- `nix run .#assemble` regenerated the module; `nix build` of the five
  aarch64-evaluable checks (module-generated-up-to-date, module-single-file,
  webhook-route, download-route, multi-user) passes natively.
- `nix eval .#checks.x86_64-linux.webhook.drvPath` resolves, so the new test
  script is valid Nix, and `check-testscript.sh tests/webhook.nix` passes both
  the driver's ty and ruff gates.
- Upstream fix landed as defangdevs/local-channels#12 with 60 unit + e2e tests
  green on python 3.9 and 3.x, mutation-checked.

Claude-Session: https://claude.ai/code/session_0195u4LJGkuYGkxCQQYEXEK1

Co-authored-by: defangdevs <defangdevs@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session added/deleted banner should be shown above tabs

2 participants