Skip to content

style(ui): polish shared console surfaces#2213

Open
riderx wants to merge 2 commits into
mainfrom
codex/ui-polish-tweaks-9067
Open

style(ui): polish shared console surfaces#2213
riderx wants to merge 2 commits into
mainfrom
codex/ui-polish-tweaks-9067

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented May 11, 2026

Summary (AI generated)

  • Polished shared console chrome: sidebar, navbar, tab rows, app/settings/admin layout backgrounds, table controls, and chart cards.
  • Refined auth page surfaces by reducing oversized radii, removing decorative orb backgrounds, and improving card/background contrast.
  • Fixed the app table footer range from zero-based display to human-readable pagination and included before/after screenshots for every changed page reviewed.

Motivation (AI generated)

The console already has a strong base, but several repeated surfaces felt heavier or less tactile than they needed to be: inactive nav items had low contrast, active tabs blended into the page background, table controls had inconsistent target sizes, and the auth pages leaned on decorative blobs. These tweaks make the product feel cleaner without changing the underlying structure or workflows.

Business Impact (AI generated)

  • Improves perceived quality across the main Capgo dashboard without a full redesign.
  • Makes repeated admin and app-management workflows easier to scan and tap.
  • Keeps the work low-risk by focusing on shared visual primitives and small behavior polish.

Screenshots (AI generated)

Page Before After
Login Login before Login after
Dashboard Dashboard before Dashboard after
Apps Apps before Apps after
App overview App overview before App overview after
App bundles App bundles before App bundles after
Settings organization Settings organization before Settings organization after

Test Plan (AI generated)

  • bun lint
  • bun typecheck
  • bun run build
  • bun test:front - 19 passed

Summary by CodeRabbit

  • New Features

    • Added configurable page size option for tables, with default of 10 items per page.
  • Style

    • Refreshed UI color theme from blue to slate across layouts and backgrounds.
    • Updated component styling for tables, navigation, cards, and buttons for improved visual consistency.
    • Enhanced font rendering with improved antialiasing.
  • Bug Fixes

    • Simplified authentication for replication status loading to use session-based tokens.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

📝 Walkthrough

Walkthrough

This PR introduces configurable pagination to DataTable via a new optional pageSize prop, simplifies replication dashboard authentication to require Supabase session tokens only, and applies a comprehensive design theme refresh across UI components by updating Tailwind classes and CSS typography settings.

Changes

Component Behavior & Authentication Updates

Layer / File(s) Summary
DataTable Pagination Props
src/components/DataTable.vue
New optional pageSize?: number prop enables external control of pagination sizing.
DataTable Pagination Logic
src/components/DataTable.vue
Computed paginationPageSize uses the prop (with offset fallback), displayElemRange and canNext() recalculate pagination bounds, and fastForward() adjusts last-page navigation to use the new size logic.
DataTable UI Styling
src/components/DataTable.vue
Header buttons, filter controls, bulk selection, table cells, action buttons, and pagination navigation receive updated Tailwind class strings for padding, sizing, colors, and hover states.
AppTable Integration
src/components/tables/AppTable.vue
AppTable now passes a fixed page-size="10" binding to DataTable.
Replication Dashboard Authentication
src/pages/admin/dashboard/replication.vue
loadReplicationStatus is simplified to always authenticate via Supabase session access token (removing the previous conditional apisecret fallback), and loading spinner minimum height is adjusted from min-h-[300px] to min-h-75.

Design & Theme Updates

Layer / File(s) Summary
Navigation Components Styling
src/components/Navbar.vue, src/components/Sidebar.vue
Navbar gains sticky positioning, backdrop blur, and refined border styling; mobile menu button is restyled with inline-flex sizing; sidebar backdrop adds blur effect; sidebar and breadcrumb links update to new hover/focus/dark-mode class variants.
Tabs Component Styling
src/components/Tabs.vue
activeTabColor() switches to updated color palettes; tab list and button class constants are updated; both primary and secondary tabs switch to overflow-x-auto for no-wrap scrolling behavior.
Authentication & Shell Styling
src/components/auth/AuthPageShell.vue, src/pages/login.vue
Decorative blob backgrounds are replaced with radial-gradient overlays; card corner radii are adjusted (rounded-2xl, rounded-xl); auth card shell and main wrapper styling is updated with new gradient, shadow, and responsive parameters.
Dashboard & Layout Background Colors
src/components/dashboard/ChartCard.vue, src/layouts/*.vue
ChartCard updates border, shadow, and gradient height; evolution badges switch to cyan-600 and amber-600; layout files change main container backgrounds from blue-tinted (bg-blue-50/dark:bg-slate-800/40) to slate-tinted (bg-slate-50/dark:bg-slate-950/40).
Global Typography & Font Rendering
src/styles/style.css
Letter-spacing CSS custom properties for all text sizes are normalized to 0 (from negative em values); html element gains -webkit-font-smoothing: antialiased and text-rendering: optimizeLegibility.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Cap-go/capgo#2035: Both PRs modify ChartCard.vue styling (border, shadow, gradient height, and badge color variants).
  • Cap-go/capgo#2202: Both PRs update the replication dashboard authentication to use Supabase session access tokens exclusively and adjust UI spinner height.
  • Cap-go/capgo#2040: Both PRs modify authentication UI styling across login.vue and auth component shells (background gradients, card radii, and decorative elements).

🐰 A hop through the theme so bright,
Sky-blue buttons catching light,
Slate-hued layouts, clean and wide,
Pages flow with better stride—
Pagination sized just right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: UI polishing of shared console surfaces through styling updates across components.
Description check ✅ Passed The description covers all required template sections: Summary, Test plan (with results), Screenshots (before/after for multiple pages), and Checklist items marked as completed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ui-polish-tweaks-9067
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch codex/ui-polish-tweaks-9067

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

@sonarqubecloud
Copy link
Copy Markdown

@riderx riderx marked this pull request as ready for review May 11, 2026 15:05
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@riderx
Copy link
Copy Markdown
Member Author

riderx commented May 11, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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: 3

🤖 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/components/dashboard/ChartCard.vue`:
- Line 74: The badge's dynamic class binding using 'bg-cyan-600' /
'bg-amber-600' for the element that shows lastDayEvolution doesn't meet WCAG
contrast; update the class binding in ChartCard.vue (the expression referencing
lastDayEvolution) to use darker background colors (e.g., 'bg-cyan-800' and
'bg-amber-800') or switch to a high-contrast text color (e.g., add 'text-black'
instead of 'text-white') and optionally increase weight/size (e.g.,
'font-semibold') so the evolution value meets accessibility contrast
requirements.

In `@src/components/tables/AppTable.vue`:
- Line 324: The table currently hard-codes :page-size="10" regardless of mode,
causing pagination UI to move while the table shows the full client-side list;
change the binding to a computed value (e.g., pageSizeForMode) and set
:page-size="pageSizeForMode", where pageSizeForMode returns 10 only when the
component is in server-side pagination mode and returns filteredApps.length (or
null/undefined) when using client-side mode; update the computed or prop logic
that determines server-side mode (the same flag you already use to decide
whether filteredApps is pre-sliced) so the paginator and rendered rows stay in
sync.

In `@src/pages/admin/dashboard/replication.vue`:
- Around line 111-113: The current thrown Error when checking "if
(!session?.access_token)" still references a replication secret fallback; update
the message to reflect that replication now relies solely on Supabase session
auth by changing the error text thrown from that check (the `if
(!session?.access_token)` branch) to a clear message like "No Supabase session
available; authentication is required to perform replication" so it no longer
mentions a replication secret.
🪄 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: 5c44921a-228a-4abf-b834-b07cf407c0db

📥 Commits

Reviewing files that changed from the base of the PR and between 7ecafcc and dc806b6.

⛔ Files ignored due to path filters (12)
  • docs/pr-screenshots/ui-polish-tweaks/after/app-bundles.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/after/app-overview.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/after/apps.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/after/dashboard.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/after/login.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/after/settings-organization.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/before/app-bundles.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/before/app-overview.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/before/apps.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/before/dashboard.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/before/login.jpg is excluded by !**/*.jpg
  • docs/pr-screenshots/ui-polish-tweaks/before/settings-organization.jpg is excluded by !**/*.jpg
📒 Files selected for processing (13)
  • src/components/DataTable.vue
  • src/components/Navbar.vue
  • src/components/Sidebar.vue
  • src/components/Tabs.vue
  • src/components/auth/AuthPageShell.vue
  • src/components/dashboard/ChartCard.vue
  • src/components/tables/AppTable.vue
  • src/layouts/admin.vue
  • src/layouts/app.vue
  • src/layouts/settings.vue
  • src/pages/admin/dashboard/replication.vue
  • src/pages/login.vue
  • src/styles/style.css

v-if="showEvolutionBadge"
class="inline-flex justify-center items-center rounded-full px-3 py-1 text-xs font-bold text-white shadow-sm"
:class="{ 'bg-cyan-500': (lastDayEvolution ?? 0) >= 0, 'bg-amber-500': (lastDayEvolution ?? 0) < 0 }"
:class="{ 'bg-cyan-600': (lastDayEvolution ?? 0) >= 0, 'bg-amber-600': (lastDayEvolution ?? 0) < 0 }"
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Increase badge contrast for accessibility.

On Line 74, bg-cyan-600 / bg-amber-600 with text-white at text-xs likely remains below WCAG AA contrast for normal text. Please use darker badge backgrounds (or darker text) to keep the evolution value readable.

Proposed patch
-              :class="{ 'bg-cyan-600': (lastDayEvolution ?? 0) >= 0, 'bg-amber-600': (lastDayEvolution ?? 0) < 0 }"
+              :class="{ 'bg-cyan-700': (lastDayEvolution ?? 0) >= 0, 'bg-amber-700': (lastDayEvolution ?? 0) < 0 }"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
:class="{ 'bg-cyan-600': (lastDayEvolution ?? 0) >= 0, 'bg-amber-600': (lastDayEvolution ?? 0) < 0 }"
:class="{ 'bg-cyan-700': (lastDayEvolution ?? 0) >= 0, 'bg-amber-700': (lastDayEvolution ?? 0) < 0 }"
🤖 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/dashboard/ChartCard.vue` at line 74, The badge's dynamic class
binding using 'bg-cyan-600' / 'bg-amber-600' for the element that shows
lastDayEvolution doesn't meet WCAG contrast; update the class binding in
ChartCard.vue (the expression referencing lastDayEvolution) to use darker
background colors (e.g., 'bg-cyan-800' and 'bg-amber-800') or switch to a
high-contrast text color (e.g., add 'text-black' instead of 'text-white') and
optionally increase weight/size (e.g., 'font-semibold') so the evolution value
meets accessibility contrast requirements.

v-model:search="internalSearch"
:show-add="!isMobile"
:total="props.total ?? filteredApps.length"
:page-size="10"
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard fixed page size to server-side mode only.

Line 324 hard-codes :page-size="10" even when filteredApps is the full unsliced list (client-side mode). That can make pagination controls/range move across pages while the table still renders all rows.

💡 Suggested fix
-        :page-size="10"
+        :page-size="props.serverSidePagination ? 10 : undefined"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
:page-size="10"
:page-size="props.serverSidePagination ? 10 : undefined"
🤖 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/tables/AppTable.vue` at line 324, The table currently
hard-codes :page-size="10" regardless of mode, causing pagination UI to move
while the table shows the full client-side list; change the binding to a
computed value (e.g., pageSizeForMode) and set :page-size="pageSizeForMode",
where pageSizeForMode returns 10 only when the component is in server-side
pagination mode and returns filteredApps.length (or null/undefined) when using
client-side mode; update the computed or prop logic that determines server-side
mode (the same flag you already use to decide whether filteredApps is
pre-sliced) so the paginator and rendered rows stay in sync.

Comment on lines +111 to 113
if (!session?.access_token)
throw new Error('No session available and replication secret is not configured')

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.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the no-session error text to match the new behavior.

Line 112 still mentions a replication secret fallback, but this flow now depends only on Supabase session auth. That message will confuse incident/debug triage.

Suggested patch
-    if (!session?.access_token)
-      throw new Error('No session available and replication secret is not configured')
+    if (!session?.access_token)
+      throw new Error('No authenticated session available for replication request')
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (!session?.access_token)
throw new Error('No session available and replication secret is not configured')
if (!session?.access_token)
throw new Error('No authenticated session available for replication request')
🤖 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/pages/admin/dashboard/replication.vue` around lines 111 - 113, The
current thrown Error when checking "if (!session?.access_token)" still
references a replication secret fallback; update the message to reflect that
replication now relies solely on Supabase session auth by changing the error
text thrown from that check (the `if (!session?.access_token)` branch) to a
clear message like "No Supabase session available; authentication is required to
perform replication" so it no longer mentions a replication secret.

@albercr3
Copy link
Copy Markdown

I think the new pagination math is only partially wired up. DataTable now uses props.pageSize ?? offset.value, but most existing server-paginated callers still pass :offset="offset" instead of :page-size, for example BuildTable.vue, BundleTable.vue, ChannelTable.vue, and DeviceTable.vue. Since offset is not a declared DataTable prop, Vue treats it as an extra attribute on the root element and paginationPageSize falls back to elementList.length.

That fallback breaks on a short final page. If a table has 25 total rows, a real page size of 10, and page 3 returns 5 rows, the range becomes 11-15 instead of 21-25, canNext() still compares 3 < Math.ceil(25 / 5), and the next/fast-forward controls can move past the real last page.

Could we either keep offset as a backwards-compatible alias in DataTable or update all the server-paginated callers to pass :page-size="offset" / their fixed page size? A regression around a 25-row table with a 5-row last page would catch this.

Copy link
Copy Markdown

@KCDaemon KCDaemon left a comment

Choose a reason for hiding this comment

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

Rechecked the current diff and the issue is still present.

DataTable now computes pagination from props.pageSize ?? offset.value, but most server-paginated callers in this PR still do not pass page-size. I confirmed BuildTable.vue still passes the old :offset="offset" attribute, while BundleTable.vue, ChannelTable.vue, and DeviceTable.vue do not pass a page size at all even though their data loaders fetch fixed-size pages (offset = 10 or 20). offset is not declared as a DataTable prop, so it does not feed paginationPageSize; the component falls back to its internal default.

That breaks the new range / next-page math whenever the real server page size differs from the fallback. For example, BuildTable fetches 20 rows per page but DataTable will calculate with the default 10, so page 2 of 25 rows is displayed as 11-25 instead of 21-25, and fast-forward / next availability can target the wrong last page. The same class of bug appears on short final pages for the 10-row tables if the fallback diverges later.

Please either keep offset as a backwards-compatible alias on DataTable, or update all server-paginated callers to pass their fixed page size explicitly. A regression with a 25-row server-paginated table and a short last page would catch this. The PR is also currently merge-conflicted, and git apply --check does not apply cleanly against current main.

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.

3 participants