Skip to content

fix(dashboard): resolve UI issues across email-* pages#1345

Merged
BilalG1 merged 1 commit intodevfrom
dashboard-ui-fixed-b2
Apr 20, 2026
Merged

fix(dashboard): resolve UI issues across email-* pages#1345
BilalG1 merged 1 commit intodevfrom
dashboard-ui-fixed-b2

Conversation

@BilalG1
Copy link
Copy Markdown
Collaborator

@BilalG1 BilalG1 commented Apr 18, 2026

Summary

Six UI issues found across the email-* dashboard pages, ranked by impact, fixed here:

  1. email-sent layout — the email log table and domain reputation card were forced side-by-side at all widths. A fixed-width sidebar plus a flex-1 table meant that on tablet the table got crushed, and on mobile the row overflowed horizontally. Fix: stack vertically below lg, and let the reputation card span full width on narrow viewports.
  2. Domain status enum leaks to the UI<span>Status: {domain.status}</span> rendered raw values like pending_dns / pending_verification. Added a MANAGED_DOMAIN_STATUS_LABELS map and route through it before rendering.
  3. email-themes dialog grid cramped on mobile — the Change Theme dialog hardcoded grid-cols-2, so at 375px each theme card had ~150px and the preview images were illegible. Changed to grid-cols-1 sm:grid-cols-2.
  4. Template name row overflow — long template names pushed the Edit Template button off the right edge of the card because the flex row had no min-w-0 / truncate. Fixed both, and made the action column shrink-0.
  5. Boosted-capacity label was color-only — during an active boost the label used a red strikethrough for the base value and a blue number for the boosted value with no non-color cue. Added an explicit arrow between the two numbers, title tooltips on each, and a visible "(boosted)" marker after /h max.
  6. Draft progress bar overflowed at mobile width — the 4-step progress bar used fixed 80px connectors, giving a minimum width of ~400px that clipped off both ends at 375px. Changed connectors to w-8 sm:w-20 (32px on mobile, 80px otherwise) so all four steps and their labels fit below 640px.

Before / after

Each GIF below loops "before" (1s) → "after" (1s) with a red pill in the top-right indicating which frame is which. Full-size stills (before + after + extra viewports) are listed under All screenshots at the bottom.

1. email-sent — two-column layout collapses on narrow viewports

Mobile (375px):

email-sent mobile

Tablet (900px):

email-sent tablet

2. email-settings — managed-domain status label

domain status

3. email-themes — Change Theme dialog on mobile

themes mobile

4. email-templates — long name overflow

templates overflow

5. email-sent — boosted capacity label

capacity label

7. email-drafts — draft progress bar on mobile

draft progress bar

Test plan

  • `pnpm --filter @stackframe/dashboard lint` — clean
  • `pnpm --filter @stackframe/dashboard typecheck` — clean
  • Manual verification in a browser at 375px / 900px / 1440px, light + dark mode, for each fixed page
  • Reviewer sanity check of the remaining email-* pages (email-outbox, email-viewer) for similar responsive regressions

Notes

  • The initial review flagged a "white-on-white capacity boost timer" — on closer look the label sits on a deliberately dark bg-zinc-900/0.82 overlay inside the boost card, so it reads fine in light and dark mode. Not fixing; that part of the review was a false positive.
  • The initial review also flagged a missing empty state on email-templates. Because Stack seeds built-in templates, the empty branch is unreachable in practice — skipping that fix to avoid dead code.

All screenshots

Gist with all the individual before/after PNGs and the GIFs themselves:
https://gist.github.com/BilalG1/edb04740a19c3f2d048da6e602209d45

Summary by CodeRabbit

Release Notes

  • New Features

    • Added human-readable status labels for managed domains in domain settings
  • Improvements

    • Enhanced responsive layouts across dashboard pages for improved mobile experience
    • Improved email capacity display with visual indicators and tooltips for boost status
    • Refined template and theme selection layouts with better text handling and spacing

- email-sent: stack the log table and domain reputation card vertically
  below lg breakpoint instead of crushing them side-by-side on mobile/tablet
- email-settings: render managed-domain statuses through a human-readable
  label map so users don't see raw enums like "pending_dns"
- email-themes: make the Select Theme dialog grid one column on mobile,
  two on sm+, instead of forcing cramped 2 columns everywhere
- email-templates: allow the template name row to shrink and truncate so
  long names don't push the Edit button off-card
- email-sent: annotate the boosted capacity label with an arrow and a
  "(boosted)" text marker so the red/blue strikethrough isn't the only cue
- email-drafts: shrink the step connectors on mobile so the 4-step progress
  bar no longer overflows the viewport at 375px
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stack-auth-hosted-components Building Building Preview Apr 18, 2026 0:30am
stack-backend Ready Ready Preview, Comment Apr 18, 2026 0:30am
stack-dashboard Ready Ready Preview, Comment Apr 18, 2026 0:30am
stack-demo Ready Ready Preview, Comment Apr 18, 2026 0:30am
stack-docs Ready Ready Preview, Comment Apr 18, 2026 0:30am
stack-preview-backend Ready Ready Preview, Comment Apr 18, 2026 0:30am
stack-preview-dashboard Ready Ready Preview, Comment Apr 18, 2026 0:30am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 18, 2026

📝 Walkthrough

Walkthrough

Six dashboard email UI components receive responsive design enhancements and display logic refinements: progress bar separators gain mobile-responsive widths, domain reputation card's capacity display adds visual indicators with tooltips and responsive layout, sent page adopts responsive flex stacking, domain settings introduce status label mapping, email template rows improve text truncation and sizing, and email themes implement responsive grid columns.

Changes

Cohort / File(s) Summary
Progress & Separator Responsive Updates
draft-progress-bar.tsx
Separator connecting widths changed from fixed w-20 to responsive w-8 sm:w-20 for mobile-friendly layout.
Domain & Reputation Display
domain-reputation-card.tsx, domain-settings.tsx
Domain reputation card: capacity display now shows strikethrough base value with arrow to boosted value and "(boosted)" marker, plus responsive card width. Domain settings: adds MANAGED_DOMAIN_STATUS_LABELS lookup table for human-friendly status rendering.
Page Layout Responsiveness
email-sent/page-client.tsx, email-themes/page-client.tsx
Email sent page: layout switches from fixed horizontal to responsive flex stacking (flex-col lg:flex-row). Email themes: dialog grid layout changes from fixed two-column to responsive single column on extra-small screens (grid-cols-1 sm:grid-cols-2).
Email Template Row Layout
email-templates/page-client.tsx
Template row containers adopt flexible left section with min-w-0 flex-1, fixed-size icon/action areas with shrink-0, and template name truncation for responsive text handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • N2D4

Poem

🐰 A dashboard grows with graceful care,
Responsive widths float here and there,
Progress bars and domains align,
Templates truncate, themes refine—
Mobile screens dance in the light,
Hopping code makes layouts right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing multiple UI issues across email-related dashboard pages, which aligns with the changeset's core purpose.
Description check ✅ Passed The description is comprehensive with clear issue summaries, detailed explanations, before/after GIFs, test results, and a solid test plan, meeting the repository's contribution guidelines.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dashboard-ui-fixed-b2

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 and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 18, 2026

Greptile Summary

This PR addresses six UI bugs across the email-* dashboard pages, all scoped to responsive layout, a raw enum value leak, and non-colour accessibility. The changes are self-contained Tailwind/JSX fixes with no logic changes to data fetching or state management.

Confidence Score: 5/5

Safe to merge — all changes are scoped to presentation and the single comment is a non-blocking style suggestion.

Every fix directly addresses a reported layout or accessibility regression with a minimal, correct change. No logic, data, or API paths are altered. The only finding is a redundant type cast that doesn't affect runtime behaviour.

No files require special attention.

Important Files Changed

Filename Overview
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-drafts/[draftId]/draft-progress-bar.tsx Connector widths changed from fixed w-20 to responsive w-8 sm:w-20 (both the bar and label spacer), preventing horizontal overflow at mobile widths.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-sent/domain-reputation-card.tsx Card width changed to w-full lg:w-72; boosted-capacity label now shows a arrow, title tooltips, and a (boosted) text marker for non-color accessibility cues.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-sent/page-client.tsx Layout wrapper changed from flex to flex flex-col lg:flex-row, so the email-log table and reputation card stack vertically below the lg breakpoint.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-settings/domain-settings.tsx Added MANAGED_DOMAIN_STATUS_LABELS map to convert raw API status values to readable labels; the type-cast and nullish fallback are unnecessary since domain.status is already ManagedDomainStatus.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-templates/page-client.tsx Template name row fixed for long names: added min-w-0 flex-1 to the left group, truncate to the name, and shrink-0 to the icon and actions column.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-themes/page-client.tsx Theme-selection dialog grid changed from grid-cols-2 to grid-cols-1 sm:grid-cols-2 so each card is readable at 375px.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Viewport width] --> B{≥ lg\n1024 px?}
    B -- Yes --> C[flex-row\nTable ↔ Reputation card side-by-side\ncard: w-72 fixed\nConnectors: w-20\nTheme grid: grid-cols-2]
    B -- No --> D{≥ sm\n640 px?}
    D -- Yes --> E[flex-col\nTable stacked above card\ncard: w-full\nConnectors: w-20\nTheme grid: grid-cols-2]
    D -- No --> F[flex-col\nTable stacked above card\ncard: w-full\nConnectors: w-8\nTheme grid: grid-cols-1]
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-settings/domain-settings.tsx
Line: 328

Comment:
**Unnecessary type cast and dead fallback**

`domain.status` is typed as `ManagedDomainStatus` and `MANAGED_DOMAIN_STATUS_LABELS` is `Record<ManagedDomainStatus, string>`, so the lookup can never return `undefined` — the cast to `Record<string, string>` and the `?? domain.status` fallback are unreachable. A direct lookup keeps the full type safety.

```suggestion
                        <span className="text-xs">Status: {MANAGED_DOMAIN_STATUS_LABELS[domain.status]}</span>
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(dashboard): resolve UI issues across..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/email-settings/domain-settings.tsx:
- Around line 43-50: The constant MANAGED_DOMAIN_STATUS_LABELS currently typed
as Record<ManagedDomainStatus, string> forces a type cast where it's looked up;
replace it with an ES6 Map (e.g., new Map<ManagedDomainStatus, string>([...]))
so missing keys return undefined naturally, then update the lookup site that
currently casts the record (the spot using MANAGED_DOMAIN_STATUS_LABELS[...] and
providing a fallback) to use MANAGED_DOMAIN_STATUS_LABELS.get(status) with the
same fallback string; remove the type cast and any related hacks so the type
system safely handles unknown ManagedDomainStatus values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3e10a443-67c3-46e9-aab9-cf60b5811ad4

📥 Commits

Reviewing files that changed from the base of the PR and between 22ae47f and cd228a3.

📒 Files selected for processing (6)
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-drafts/[draftId]/draft-progress-bar.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-sent/domain-reputation-card.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-sent/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-settings/domain-settings.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-templates/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-themes/page-client.tsx

Copy link
Copy Markdown
Contributor

@N2D4 N2D4 left a comment

Choose a reason for hiding this comment

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

good stuff

@github-actions github-actions bot assigned BilalG1 and unassigned N2D4 Apr 19, 2026
@BilalG1 BilalG1 merged commit 6bc1836 into dev Apr 20, 2026
42 checks passed
@BilalG1 BilalG1 deleted the dashboard-ui-fixed-b2 branch April 20, 2026 05:58
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