Skip to content

feat: improve mobile dashboard responsiveness#31

Merged
ECWireless merged 3 commits into
mainfrom
codex/mobile-dashboard-qa
Jul 1, 2026
Merged

feat: improve mobile dashboard responsiveness#31
ECWireless merged 3 commits into
mainfrom
codex/mobile-dashboard-qa

Conversation

@ECWireless

@ECWireless ECWireless commented Jul 1, 2026

Copy link
Copy Markdown
Member

This pull request introduces Playwright-based end-to-end (E2E) testing to the project, including all necessary configuration, scripts, and documentation for running E2E tests across multiple device viewports. It also makes minor UI improvements for better accessibility and responsive design in admin pages. The most important changes are grouped below:

End-to-End Testing Infrastructure:

  • Adds Playwright as a dev dependency (@playwright/test), updates pnpm-lock.yaml, and provides install/test scripts in package.json for running E2E tests. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
  • Adds a Playwright configuration file (playwright.config.ts) to run tests in parallel across mobile, tablet, and desktop viewports, and to launch the Next.js dev server with E2E mock authentication enabled.
  • Updates .env.example to include a new E2E_AUTH_ENABLED variable for local mock session support during E2E tests.
  • Documents E2E testing setup and usage in README.md, including installation, running tests, and environment requirements.
  • Updates ESLint configuration to ignore Playwright output directories.

Admin UI Accessibility & Responsiveness:

Summary by CodeRabbit

  • New Features

    • Added responsive “card table” layouts across multiple admin, reports, and member-related views.
    • Improved mobile navigation with a drawer menu for key sections.
    • Introduced Playwright E2E support, including new scripts and configuration for multi-viewport runs.
  • Bug Fixes

    • Reduced horizontal scrolling/overflow issues and improved mobile readability for data-heavy tables.
    • Refined transaction explorer link rendering and touch-friendly button/dropdown sizing.
  • Documentation

    • Updated E2E setup guidance and environment example for local-only auth mocking.
  • Tests

    • Added a responsive dashboard E2E smoke test suite with role-aware checks and screenshots.

Copilot AI review requested due to automatic review settings July 1, 2026 04:12
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
raidguild-accounting Ready Ready Preview, Comment Jul 1, 2026 1:36pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ECWireless, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bcbf0574-b2bc-4272-8c33-30cf96781d95

📥 Commits

Reviewing files that changed from the base of the PR and between d2f5855 and b5eb92f.

📒 Files selected for processing (7)
  • src/app/admin/providers/page.tsx
  • src/app/admin/quarters/[id]/transactions/page.tsx
  • src/app/admin/treasury-accounts/page.tsx
  • src/app/membership/page.tsx
  • src/app/proposals/page.tsx
  • src/app/reports/quarters/[id]/page.tsx
  • src/app/rips/page.tsx
📝 Walkthrough

Walkthrough

This PR adds Playwright E2E testing support with a gated mock auth session route and responsive dashboard spec, and updates navigation, button sizing, CSS utilities, and multiple admin/public tables to mobile-friendly card-table layouts.

Changes

E2E Testing Infrastructure

Layer / File(s) Summary
Playwright config, scripts, and docs
\.env.example, .gitignore, eslint.config.mjs, package.json, playwright.config.ts, README.md
Adds the E2E_AUTH_ENABLED env flag, Playwright config, e2e scripts and dependency, artifact ignore rules, and setup/run instructions.
Mock e2e session API route
src/app/api/e2e/session/route.ts
Adds gated POST/DELETE handlers for creating and destroying a local mock auth session with role-based permissions.
Responsive dashboard E2E spec
tests/e2e/responsive-dashboard.spec.ts
Adds Playwright smoke, local-data, and modal checks for responsive routes, overflow, and session-driven navigation.

Responsive Mobile UI Overhaul

Layer / File(s) Summary
Global CSS utilities and button variants
src/app/globals.css, src/components/ui/button.tsx
Adds reset rules, drawer animations, mobile table/card-table utilities, and updated button size variants.
Mobile navigation drawer and dropdown positioning
src/components/app-header.tsx, src/components/auth/wallet-connect.tsx
Adds primary nav links, a mobile drawer with keyboard handling, and responsive wallet dropdown positioning.
Admin pages mobile table conversion
src/app/admin/providers/page.tsx, src/app/admin/treasury-accounts/page.tsx, src/app/admin/quarters/[id]/transactions/page.tsx, src/app/admin/quarters/[id]/transactions/classification-linked-fields.tsx
Converts admin tables and transaction review layouts to mobile-card-table markup and widens select inputs.
Public pages mobile table conversion
src/app/membership/page.tsx, src/app/proposals/page.tsx, src/app/raids/page.tsx, src/app/reports/page.tsx, src/app/reports/quarters/[id]/page.tsx, src/app/rips/page.tsx, src/app/page.tsx
Converts public-facing tables to mobile-card-table layouts, updates raid cell rendering, and adjusts the homepage hero logo sizing.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PlaywrightTest
  participant SessionRoute
  participant AuthSession

  PlaywrightTest->>SessionRoute: POST { role }
  SessionRoute->>SessionRoute: isE2EAuthEnabled(request)
  SessionRoute->>AuthSession: getAuthSession()
  SessionRoute->>AuthSession: set address, chainId, permissions, viewMode
  AuthSession-->>SessionRoute: save()
  SessionRoute-->>PlaywrightTest: serialized session

  PlaywrightTest->>SessionRoute: DELETE
  SessionRoute->>AuthSession: destroy()
  SessionRoute-->>PlaywrightTest: { ok: true }
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main responsiveness-focused UI changes in the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/mobile-dashboard-qa

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a Playwright-based E2E smoke suite to validate responsive behavior across key dashboard/admin routes, and it refactors several admin tables and header interactions to improve mobile usability and reduce horizontal overflow.

Changes:

  • Introduces Playwright E2E infrastructure (config, scripts, docs, mock-session API) to run viewport-based responsiveness checks.
  • Updates admin/report tables to a mobile “card table” layout via shared CSS utilities and per-cell labels.
  • Improves mobile navigation and UI touch targets (header drawer, button sizing, responsive form controls).

Reviewed changes

Copilot reviewed 22 out of 24 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/e2e/responsive-dashboard.spec.ts Adds responsive smoke/E2E coverage and overflow/error-overlay checks across routes and roles.
playwright.config.ts Configures Playwright projects for multiple viewports and starts next dev with E2E auth enabled.
package.json Adds pnpm test:e2e and pnpm test:e2e:install scripts plus Playwright devDependency.
pnpm-lock.yaml Locks Playwright and its transitive dependencies.
README.md Documents E2E setup, browser deps install, and how mock sessions work.
.env.example Adds E2E_AUTH_ENABLED example flag for local-only mock sessions.
eslint.config.mjs Ignores Playwright output directories.
.gitignore Ignores Playwright report and test-results output.
src/app/api/e2e/session/route.ts Adds local-only mock session endpoint for E2E role switching.
src/app/globals.css Adds drawer animations, box-sizing/body margin reset, and mobile card-table CSS utilities.
src/components/app-header.tsx Adds a mobile drawer navigation menu and reorganizes header layout for small screens.
src/components/auth/wallet-connect.tsx Adjusts profile dropdown sizing/positioning for small viewports.
src/components/ui/button.tsx Increases default button hit areas on mobile via responsive size variants.
src/app/page.tsx Adjusts public home logo sizing for better mobile fit.
src/app/reports/page.tsx Makes report action buttons full-width on mobile for improved usability.
src/app/reports/quarters/[id]/page.tsx Converts ranked/balance tables to mobile card-table layout with per-cell labels.
src/app/proposals/page.tsx Converts proposals activity table to mobile card-table layout with per-cell labels.
src/app/membership/page.tsx Converts cleric roles + membership activity tables to mobile card-table layout.
src/app/rips/page.tsx Converts RIPs table to mobile card-table layout and adjusts padding for responsiveness.
src/app/raids/page.tsx Converts raid tables to mobile card-table layout via a labeled TableLinkCell helper.
src/app/admin/providers/page.tsx Converts providers ranking table to mobile card-table layout with per-cell labels.
src/app/admin/treasury-accounts/page.tsx Converts treasury accounts ranking table to mobile card-table-lg layout with per-cell labels.
src/app/admin/quarters/[id]/transactions/classification-linked-fields.tsx Makes select inputs full-width/min-width safe for narrow screens.
src/app/admin/quarters/[id]/transactions/page.tsx Adds multiple responsive/overflow mitigations and card-table layouts within transaction review.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

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

Comment thread src/app/globals.css
Comment thread src/app/globals.css
Comment thread src/app/api/e2e/session/route.ts
Comment thread src/app/api/e2e/session/route.ts Outdated
Comment thread src/app/admin/quarters/[id]/transactions/page.tsx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (3)
src/components/app-header.tsx (1)

343-351: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Redundant inline style overriding Tailwind class on close button.

className already sets z-[60], but the inline style={{ pointerEvents: "auto", zIndex: 1000 }} silently overrides it (inline styles win over classes), rendering the z-[60] class dead. This looks like a leftover workaround rather than an intentional decision. If there's a real stacking-context issue this is compensating for, prefer fixing the root cause via Tailwind (z-[1000]) rather than mixing inline styles with utility classes.

♻️ Suggested cleanup
           <button
             type="button"
             aria-label="Close menu"
             onClick={() => setMobileMenuOpen(false)}
-            className="drawer-panel-enter fixed right-4 top-4 z-[60] inline-flex size-10 cursor-pointer items-center justify-center rounded-lg border border-scroll-300/25 bg-moloch-900/80 text-scroll-100 shadow-xl shadow-black/30 transition-all hover:bg-scroll-100/10 focus-visible:ring-2 focus-visible:ring-scroll-300"
-            style={{ pointerEvents: "auto", zIndex: 1000 }}
+            className="drawer-panel-enter pointer-events-auto fixed right-4 top-4 z-[1000] inline-flex size-10 cursor-pointer items-center justify-center rounded-lg border border-scroll-300/25 bg-moloch-900/80 text-scroll-100 shadow-xl shadow-black/30 transition-all hover:bg-scroll-100/10 focus-visible:ring-2 focus-visible:ring-scroll-300"
           >
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/app-header.tsx` around lines 343 - 351, The close button in
app-header has redundant inline styling that overrides the Tailwind z-index
utility, making the existing z-[60] in the button’s className ineffective.
Update the button markup so the stacking behavior is handled consistently
through Tailwind in the same component (or remove the inline zIndex if it’s
unnecessary), and keep pointerEvents only if it is actually required for the
drawer close control.
src/app/admin/quarters/[id]/transactions/page.tsx (2)

1092-1109: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate transaction-explorer-link markup across cards.

The exact same anchor/fallback-span structure (link container, truncate hash span, ExternalLink icon, sr-only text) is repeated in the classified TransferCard, the unclassified TransferCard (~1201-1215), and ManualLedgerEntryCard. Consider extracting a small TransactionExplorerLink({ url, hash }) helper to avoid tripling this markup and its future maintenance cost.

♻️ Proposed extraction
+function TransactionExplorerLink({
+  hash,
+  url,
+}: {
+  hash: string;
+  url: string | null;
+}) {
+  if (!url) {
+    return (
+      <span className="font-mono text-xs text-muted-foreground">
+        {formatHash(hash)}
+      </span>
+    );
+  }
+
+  return (
+    <a
+      href={url}
+      target="_blank"
+      rel="noreferrer"
+      className="inline-flex min-w-0 items-center gap-1 rounded-md border border-border bg-background px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground"
+    >
+      <span className="truncate">{formatHash(hash)}</span>
+      <ExternalLink className="size-3" aria-hidden="true" />
+      <span className="sr-only">Open transaction explorer</span>
+    </a>
+  );
+}

Also applies to: 1362-1388

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/admin/quarters/`[id]/transactions/page.tsx around lines 1092 - 1109,
The transaction explorer link markup is duplicated across multiple card
components, making it harder to maintain. Extract the repeated anchor/fallback
display into a shared helper such as TransactionExplorerLink used by
TransferCard and ManualLedgerEntryCard, and pass in the url and hash so the
truncate span, ExternalLink icon, and sr-only text are defined once.

1555-1580: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fragile nested calc(100% - 0.25rem) width hack.

Two nested elements independently apply width/maxWidth: calc(100% - 0.25rem) via inline styles. The purpose of this specific 4px offset isn't documented, and stacking the same magic number on parent and child is easy to break during future edits. Consider replacing with standard Tailwind width/overflow utilities (w-full max-w-full overflow-hidden) or documenting why the offset is needed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/admin/quarters/`[id]/transactions/page.tsx around lines 1555 - 1580,
The layout in the transactions page uses a fragile nested `calc(100% - 0.25rem)`
width hack on the outer wrapper and inner content block, which is hard to
maintain. Update the section and its containing divs in `page.tsx` to use
standard sizing/overflow utilities such as `w-full`, `max-w-full`, and
`overflow-hidden` where possible, or clearly document the offset if it must
remain. Keep the existing structure around the transactions header/quarter
summary elements intact while removing duplicated magic-number sizing from these
nested wrappers.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/app/api/e2e/session/route.ts`:
- Around line 12-17: The session route’s E2E auth gate only checks NODE_ENV and
E2E_AUTH_ENABLED, so it can still be abused on non-local deployments. Update
isE2EAuthEnabled in the session route to also verify the request is local-only
(for example by validating host/origin against localhost or requiring a shared
secret) before allowing the POST/DELETE handlers to mint or clear sessions. Make
the same guard apply consistently in the route handler logic that processes the
session creation and deletion paths so non-local requests are rejected early.

In `@src/app/globals.css`:
- Line 145: Stylelint is flagging plain declarations that անմmediately follow
Tailwind `@apply` rules in globals.css; add the required blank line before each
affected declaration so the declaration-empty-line-before rule is satisfied.
Update the specific blocks around box-sizing: border-box and each overflow-wrap:
anywhere occurrence after `@apply` in the same stylesheet, keeping the existing
semantics but separating the declaration groups consistently.
- Around line 245-251: The mobile table labeling in the `.mobile-card-table`
styles relies on `td::before` generated content while hiding `thead`, which can
leave screen readers without column names. Update the table markup used by the
components behind these styles so each `td` includes the label text in the DOM
(for example via an `sr-only` span or equivalent), and keep the existing CSS
only for visual presentation. Use the `.mobile-card-table` selectors in
globals.css to locate the affected responsive table behavior.

In `@src/app/proposals/page.tsx`:
- Around line 84-85: The wrapper around the table in the proposals page uses
`mobile-card-table-lg` but removes padding too early with `md:p-0`, creating a
breakpoint mismatch. Update the surrounding card container for this table to
keep its padding until the same `lg` breakpoint used by `mobile-card-table-lg`,
matching the pattern used in `TransactionsPage` so the stacked-card layout and
outer card styling transition together.

In `@src/components/app-header.tsx`:
- Around line 299-354: The mobile drawer in app-header.tsx needs proper modal
accessibility behavior. Update the mobile menu container/aside to use dialog
semantics with aria-modal, move initial focus into the drawer when
mobileMenuOpen becomes true (prefer the close button via a ref), trap Tab
navigation inside the open drawer, and restore focus to the hamburger trigger
when it closes. Use the existing mobile menu state and the drawer button/aside
elements in app-header.tsx to wire this behavior.

---

Nitpick comments:
In `@src/app/admin/quarters/`[id]/transactions/page.tsx:
- Around line 1092-1109: The transaction explorer link markup is duplicated
across multiple card components, making it harder to maintain. Extract the
repeated anchor/fallback display into a shared helper such as
TransactionExplorerLink used by TransferCard and ManualLedgerEntryCard, and pass
in the url and hash so the truncate span, ExternalLink icon, and sr-only text
are defined once.
- Around line 1555-1580: The layout in the transactions page uses a fragile
nested `calc(100% - 0.25rem)` width hack on the outer wrapper and inner content
block, which is hard to maintain. Update the section and its containing divs in
`page.tsx` to use standard sizing/overflow utilities such as `w-full`,
`max-w-full`, and `overflow-hidden` where possible, or clearly document the
offset if it must remain. Keep the existing structure around the transactions
header/quarter summary elements intact while removing duplicated magic-number
sizing from these nested wrappers.

In `@src/components/app-header.tsx`:
- Around line 343-351: The close button in app-header has redundant inline
styling that overrides the Tailwind z-index utility, making the existing z-[60]
in the button’s className ineffective. Update the button markup so the stacking
behavior is handled consistently through Tailwind in the same component (or
remove the inline zIndex if it’s unnecessary), and keep pointerEvents only if it
is actually required for the drawer close control.
🪄 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: 3feff739-b1a7-42e9-94d9-5dce399dfd2d

📥 Commits

Reviewing files that changed from the base of the PR and between cbe6675 and daf44b2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (23)
  • .env.example
  • .gitignore
  • README.md
  • eslint.config.mjs
  • package.json
  • playwright.config.ts
  • src/app/admin/providers/page.tsx
  • src/app/admin/quarters/[id]/transactions/classification-linked-fields.tsx
  • src/app/admin/quarters/[id]/transactions/page.tsx
  • src/app/admin/treasury-accounts/page.tsx
  • src/app/api/e2e/session/route.ts
  • src/app/globals.css
  • src/app/membership/page.tsx
  • src/app/page.tsx
  • src/app/proposals/page.tsx
  • src/app/raids/page.tsx
  • src/app/reports/page.tsx
  • src/app/reports/quarters/[id]/page.tsx
  • src/app/rips/page.tsx
  • src/components/app-header.tsx
  • src/components/auth/wallet-connect.tsx
  • src/components/ui/button.tsx
  • tests/e2e/responsive-dashboard.spec.ts

Comment thread src/app/api/e2e/session/route.ts Outdated
Comment thread src/app/globals.css
Comment thread src/app/globals.css
Comment thread src/app/proposals/page.tsx Outdated
Comment thread src/components/app-header.tsx
@ECWireless

Copy link
Copy Markdown
Member Author

Addressed the review feedback in d2f5855.

What changed:

  • Restricted the E2E session route to local hosts for both POST and DELETE.
  • Added modal semantics, focus entry/trapping/restoration, and Tailwind-only stacking for the mobile drawer.
  • Kept responsive table headers in the accessibility tree and made CSS-generated labels visual-only where supported.
  • Aligned the proposals table wrapper breakpoint with mobile-card-table-lg.
  • Extracted the repeated transaction explorer link and moved the transaction review width offset into a named utility.

Verified locally:

  • git diff --check
  • pnpm lint
  • pnpm build
  • pnpm exec playwright test --reporter=dot -> 64 passed

@ECWireless ECWireless merged commit df5a25d into main Jul 1, 2026
5 checks passed
@ECWireless ECWireless deleted the codex/mobile-dashboard-qa branch July 1, 2026 13:44
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