Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

fix(notifications): hide action bar when all actions have empty IDs - #1181

Closed
shunkakinoki wants to merge 1 commit into
Jas-SinghFSU:masterfrom
shunkakinoki:fix/hide-empty-notification-action-bar
Closed

fix(notifications): hide action bar when all actions have empty IDs#1181
shunkakinoki wants to merge 1 commit into
Jas-SinghFSU:masterfrom
shunkakinoki:fix/hide-empty-notification-action-bar

Conversation

@shunkakinoki

Copy link
Copy Markdown

Problem

Some applications (e.g. Claude Code) send notifications with an empty action — an action where id is an empty string "". The NotificationCard guard checks get_actions().length, which is > 0 for this empty action, so the Actions component gets rendered. But since there are no real buttons, the result is a blank pale bar visible at the bottom of the notification popup.

Empty action bar

Fix

Filter out actions with an empty id before:

  1. The guard in Notification/index.tsx — so actionBox stays null and the bar is never rendered
  2. The map in Actions/index.tsx — defensive filter so the button list is also clean if Actions is ever called directly
- if (notification.get_actions().length) {
+ if (notification.get_actions().filter((a) => a.id !== '').length) {
- {notification.get_actions().map((action) => {
+ {notification.get_actions().filter((a) => a.id !== '').map((action) => {

Testing

  • Notifications with no real actions (empty id): action bar is hidden
  • Notifications with real actions: action buttons render as before

@Jas-SinghFSU

Copy link
Copy Markdown
Owner

Hey @shunkakinoki , thanks for this PR and for the time you put into it.

HyprPanel is being archived in the next couple of weeks in favor of Wayle (context: #1193). Closing this PR since there won't be any further HyprPanel releases. Your branch is unaffected, so anyone forking HyprPanel can pick this up.

If this also applies to Wayle, a PR at https://github.com/wayle-rs/wayle would be very welcome.

Thanks again! <3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants