Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixed-15288-merge-toast-above-chat-fab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- The Activity Monitor's merged toasts now render above the chat button: the `--z-merge-banner` / `--z-cue-flight` layer tokens were scoped to the section while the toast stack mounts on `<body>`, so the stack had no z-index and the chat FAB covered the lowest toast's close × and truncated its text ([#15288](https://github.com/hivecommons/hive/issues/15288)).
34 changes: 34 additions & 0 deletions src/pkg/dashboard/stage_tracker_cues_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,3 +721,37 @@ assert.ok(toasts.some(x => x[0] === 'warning' && /No row to celebrate on/.test(x
console.log('ok');
`)
}

// TestStageTrackerMergeBannersAboveChatFab guards the merged-toast layer
// against the chat FAB: #merge-banners and the .cue-flight glyph are appended
// to document.body, so their z-index tokens must resolve at :root. Scoped to
// #activity-monitor-section they resolved to nothing, the stack fell back to
// z-index:auto and the FAB (z-index 9000) covered the lowest toast's close ×
// and truncated its text. The toast stack must also stay pointer-transparent
// around the banners while each banner remains clickable.
func TestStageTrackerMergeBannersAboveChatFab(t *testing.T) {
html := indexHTML(t)
root := ":root { --z-cue-flight: 10000; --z-merge-banner: 10001; }"
if !strings.Contains(html, root) {
t.Fatalf("merge-banner layer tokens must be :root-scoped, want %q", root)
}
if strings.Contains(cssRule(t, html, "#activity-monitor-section"), "--z-merge-banner") {
t.Fatalf("--z-merge-banner must not be scoped to #activity-monitor-section (banners mount on document.body)")
}
if !strings.Contains(html, "box.id = 'merge-banners'; box.className = 'merge-banners'; box.setAttribute('aria-live', 'polite'); document.body.appendChild(box);") {
t.Fatalf("merge-banners container must mount on document.body")
}
banners := cssRule(t, html, ".merge-banners")
for _, want := range []string{"position: fixed;", "z-index: var(--z-merge-banner);", "pointer-events: none;"} {
if !strings.Contains(banners, want) {
t.Errorf(".merge-banners rule missing %q: %s", want, banners)
}
}
if !strings.Contains(cssRule(t, html, ".merge-banner"), "pointer-events: auto;") {
t.Errorf(".merge-banner must re-enable pointer events so the close × stays clickable")
}
fab := cssRule(t, html, ".hive-chat-fab")
if !strings.Contains(fab, "z-index: 9000;") {
t.Errorf(".hive-chat-fab z-index moved; keep it below --z-merge-banner (10001): %s", fab)
}
}
11 changes: 8 additions & 3 deletions src/pkg/dashboard/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1328,9 +1328,14 @@
Review, 085/090 on Merge gate) light the chevron they branch from in
their own words, so every strip is the same width. An issue parked on
a person (045) lights Actionable with the decision word. */
/* The sticky chip bar's height (the header strip sticks beneath it) and
the layers for the merge flight and banners (above the modal chrome). */
#activity-monitor-section { --ham-sticky-bar-h: 34px; --z-cue-flight: 10000; --z-merge-banner: 10001; }
/* The sticky chip bar's height (the header strip sticks beneath it). */
#activity-monitor-section { --ham-sticky-bar-h: 34px; }
/* Layers for the merge flight glyph and the merged-toast stack. Both are
appended to document.body, not to #activity-monitor-section, so these must be
:root-scoped — scoped to the section they resolved to nothing, the
stack fell back to z-index:auto and the chat FAB (9000) covered the
lowest toast's close × and text. Above the FAB and the modal chrome. */
:root { --z-cue-flight: 10000; --z-merge-banner: 10001; }
.ham-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin-bottom: var(--sp-5); font-size: var(--fs-sm); color: var(--muted); }
.ham-toolbar label { display: inline-flex; align-items: center; gap: var(--sp-2); }
.ham-repo-filter { position: static; flex: 0 1 auto; gap: 0; min-width: 0; white-space: nowrap; }
Expand Down
Loading