Skip to content

fix(chat): action buttons hidden under next turn sticky header#10

Closed
bashrusakh wants to merge 1 commit into
mainfrom
issue-2095-kinetic-salamander
Closed

fix(chat): action buttons hidden under next turn sticky header#10
bashrusakh wants to merge 1 commit into
mainfrom
issue-2095-kinetic-salamander

Conversation

@bashrusakh

Copy link
Copy Markdown
Owner

Summary

Fixes openchamber#2095 — action buttons (copy, edit, etc.) at the bottom of assistant messages were hidden/overlapped by the next turn's sticky user header due to a CSS stacking context conflict.

Root cause

The assistant block used relative z-0 which created a stacking context at z-index 0. The next turn's sticky user header used sticky top-0 z-20 creating a stacking context at z-index 20. Both were in the same parent stacking context (ChatContainer's relative z-0), so z-20 painted on top of z-0 — the next turn's sticky header covered the previous turn's action buttons.

ChatContainer (relative z-0) ← root stacking context
├── Turn N section (relative w-full — no stacking context)
│   ├── sticky header (sticky z-20) ← z-index 20
│   └── TurnAssistantBlock (relative z-0) ← z-index 0
│       └── action buttons ← trapped inside z-0
├── Turn N+1 section (relative w-full — no stacking context)
│   ├── sticky header (sticky z-20) ← z-index 20, paints over z-0
│   └── TurnAssistantBlock (relative z-0) ← z-index 0

Fix

Three minimal CSS-class changes across 3 files — no logic/behavior change:

  1. TurnItem.tsx — removed redundant relative from the sticky header (sticky is already a positioned element, so relative was redundant and confusing per issue report)
  2. TurnAssistantBlock.tsx — removed z-0 so the assistant block's children are no longer isolated at z-index 0 and can participate in the parent stacking context
  3. MessageBody.tsx — added relative z-30 to all 3 action button containers (inline actions ~L1743, standalone actions ~L2064, turn footer ~L2072) so they paint above the sticky header's z-20

Files changed

File Change
packages/ui/src/components/chat/components/TurnItem.tsx removed redundant relative from sticky header
packages/ui/src/components/chat/components/TurnAssistantBlock.tsx removed z-0 from wrapper div
packages/ui/src/components/chat/message/MessageBody.tsx added relative z-30 to 3 action button containers

Validation

Check Result
bun run --cwd packages/ui type-check ✅ pass
bun run --cwd packages/ui lint ✅ pass
OCR code review (glm-5.2) ✅ 0 comments — Looks good to me

Notes

…hamber#2095)

The assistant block used 'relative z-0' which created a stacking context
at z-index 0. The next turn's sticky user header used 'sticky top-0 z-20'
creating a stacking context at z-index 20. Both were in the same parent
stacking context (ChatContainer's 'relative z-0'), so z-20 painted on top
of z-0, hiding the action buttons at the bottom of assistant messages.

Fix:
- Remove redundant 'relative' from the sticky header (sticky is already
  positioned, so 'relative' was redundant and confusing)
- Remove 'z-0' from TurnAssistantBlock so its children are not isolated
  at z-index 0
- Add 'relative z-30' to action button containers in MessageBody so they
  paint above the sticky header's z-20
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c7b9a37e-c57c-49c6-83fa-36263ae23a66

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-2095-kinetic-salamander

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bashrusakh

Copy link
Copy Markdown
Owner Author

Closing — created in wrong repo (fork instead of upstream). Will reopen against openchamber/openchamber.

@bashrusakh bashrusakh closed this Jul 11, 2026
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.

Action buttons hidden under overlapping messages

1 participant