Skip to content

fix(ui): give EmptyState a bounded outline instead of floating text - #87

Merged
malickyeu merged 1 commit into
mainfrom
feat/empty-state
Jul 30, 2026
Merged

fix(ui): give EmptyState a bounded outline instead of floating text#87
malickyeu merged 1 commit into
mainfrom
feat/empty-state

Conversation

@malickyeu

Copy link
Copy Markdown
Contributor

Summary

On a QHD screen the empty states read as a rendering failure, not as an empty
list: two lines of muted text centred in a very large content area, with nothing
framing them. Scanning from the left you see blank space, then stray grey text
somewhere near the middle.

EmptyState is now a dashed-outline panel spanning the content width, with an icon
chip and the title in normal text (the hint stays muted).

Before / after on a 2560-wide viewport (Alerts → Webhooks):

Before two muted lines floating in ~2300px of empty dark space
After bounded dashed panel, icon, readable title

Type of change

  • Bug fix
  • New feature
  • Docs only
  • Refactor / chore

Checklist

  • go test -short ./... and go vet ./... pass
  • gofmt gate is clean — N/A in effect (no Go changes) but verified
  • Frontend type-checks (cd web && npx tsc --noEmit)
  • Rebuilt and committed web/dist
  • Added/updated tests for the change — see note below
  • Updated docs/ and added a CHANGELOG.md entry — N/A (presentation-only;
    no behaviour or API change, nothing for a user to act on)

Notes for reviewers

One component, 17 call sites, no signature break. icon and action are added
as optional props, so every existing <EmptyState title hint /> keeps working
untouched — tsc over the whole app confirms it. The action slot is there so a
page with an obvious next step can put the button inside the placeholder later;
nothing uses it yet.

On tests: this is pure presentation — there's no logic to assert, and the repo
has no component-rendering harness (Vitest runs in node, no jsdom/RTL). Adding one
just for this felt disproportionate. What I did instead was verify it the way the
bug was reported: rendered at 2560×1440 in a real browser and compared
screenshots before and after. If you'd like a rendering harness set up, say so and
I'll do it as its own piece of work rather than smuggling it in here.

Why a dashed outline rather than a solid card: a solid card reads as content
that failed to load; the dashed border is the conventional "nothing here yet"
affordance and stays visually distinct from real cards on the same page.

On a QHD screen the content area is enormous, so two lines of muted text
centred in it read as a rendering failure rather than as an empty list —
scanning from the left you see nothing, then stray grey text somewhere near
the middle.

It is now a dashed-outline panel spanning the content width, with an icon
chip and a title in normal text (the hint stays muted). The eye gets
something that obviously belongs there.

Optional icon and action props are added, so a page with an obvious next step
can put it in the placeholder. Existing props are unchanged, so all 17 call
sites keep working untouched.
Copilot AI review requested due to automatic review settings July 30, 2026 15:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the shared EmptyState UI component so empty-list views read as an intentional placeholder on wide screens, rather than “floating” muted text that can resemble a rendering failure.

Changes:

  • Redesigned EmptyState into a bounded dashed-outline panel with a default icon chip and clearer title styling.
  • Expanded EmptyState props to optionally accept a custom icon and an action slot (while keeping existing call sites compatible).
  • Regenerated web/dist assets to reflect the UI change.

Reviewed changes

Copilot reviewed 1 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
web/src/components/ui.tsx Reworks EmptyState markup/styles and adds optional icon/action props with a default Lucide icon.
web/dist/index.html Updates hashed asset references after rebuilding the frontend bundle.
web/dist/assets/index-yRfiesog.css Removes the previous hashed CSS asset from dist.
web/dist/assets/index-B-n6FhZu.css Adds the new hashed CSS asset containing the updated Tailwind output.
web/dist/assets/CodeEditor-DLkC4cLO.js Updates the import to the newly hashed main bundle filename after rebuild.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@malickyeu
malickyeu merged commit 718a1da into main Jul 30, 2026
4 checks passed
@malickyeu
malickyeu deleted the feat/empty-state branch July 30, 2026 15:42
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.

2 participants