Skip to content

fix: make admin panel responsive - #238

Open
AmzBG wants to merge 1 commit into
mhmdfarhat-mhmdali-amirfrom
feat/responsive-admin-panel
Open

fix: make admin panel responsive#238
AmzBG wants to merge 1 commit into
mhmdfarhat-mhmdali-amirfrom
feat/responsive-admin-panel

Conversation

@AmzBG

@AmzBG AmzBG commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Make the authenticated admin shell, top navigation, page headers, actions, and pagination adapt cleanly to smaller screens.
  • Add mobile card layouts for the accounts, projects, and audit-log pages while retaining the existing tables on tablet and desktop views.
  • Stack search controls and moderation actions on narrow screens and allow long names, emails, repository details, IDs, and reasons to wrap without causing horizontal overflow.
  • Improve the admin overview activity section for mobile layouts.

Link to issue or ticket

N/A

Steps to QA

  1. Sign in as a platform administrator and open /admin at mobile, tablet, and desktop widths.
  2. Confirm the overview cards and recent moderation activity fit the viewport without horizontal scrolling.
  3. Open /admin/accounts, /admin/projects, and /admin/logs on a mobile viewport and confirm each item is displayed as a readable card.
  4. Search and filter each list, use pagination where available, and open the suspend/reactivate/restore dialogs.
  5. Resize to tablet or desktop width and confirm the full tables are displayed and remain horizontally contained.

Automated checks:

  • npm test --workspace=api -- --runInBand
  • npx turbo run lint
  • npx turbo run check-types
  • npm run format:check

Screenshots

N/A

Summary by CodeRabbit

  • New Features
    • Added responsive mobile card layouts for account, project, and audit log results.
    • Preserved desktop table views with horizontal scrolling where needed.
    • Improved responsive search controls, pagination, headers, and moderation activity layouts.
  • Style
    • Updated dashboard and navigation spacing for improved usability across screen sizes.
    • Added better text wrapping and full-width actions on narrow screens.

@AmzBG AmzBG self-assigned this Aug 11, 2026
@AmzBG AmzBG added the enhancement New feature or request label Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The admin console now uses responsive spacing, controls, cards, tables, headers, and pagination. Account, project, and audit-log results provide mobile card layouts while retaining desktop table views.

Changes

Responsive admin console

Layer / File(s) Summary
Responsive shell and shared controls
apps/web/app/(authenticated)/admin/layout.tsx, apps/web/app/(authenticated)/layout.tsx, apps/web/components/top-navbar.tsx, apps/web/components/admin/admin-ui.tsx
Shared layouts and controls now support responsive padding, wrapping, constrained content, flexible buttons, and minimum-width handling.
Responsive account and project views
apps/web/app/(authenticated)/admin/accounts/page.tsx, apps/web/app/(authenticated)/admin/projects/page.tsx
Search controls stack on small screens. Account and project results render mobile cards and retain desktop tables with existing statuses and actions.
Responsive audit log views
apps/web/app/(authenticated)/admin/logs/page.tsx
Audit-log filters and results now adapt to small screens with stacked cards and retain a scrollable desktop table.
Responsive moderation activity
apps/web/app/(authenticated)/admin/page.tsx
Moderation headers, activity labels, actor metadata, and actions now wrap and align responsively.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: mohamad12farhat, mohamadbakawi

🚥 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
Title check ✅ Passed The title clearly and concisely describes the main change: making the admin panel responsive.
Description check ✅ Passed The description covers the required sections, explains the responsive changes, and provides manual and automated QA steps.
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/responsive-admin-panel

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: one or more packages not found in the registry.


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.

@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: 1

🤖 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 `@apps/web/app/`(authenticated)/admin/accounts/page.tsx:
- Around line 107-124: Replace the controlled native search forms with
react-hook-form configured through zodResolver and the corresponding schema from
`@repo/contracts`: use the account-search schema in
apps/web/app/(authenticated)/admin/accounts/page.tsx (107-124), the
project-search schema in apps/web/app/(authenticated)/admin/projects/page.tsx
(105-122), and the audit-log-search schema in
apps/web/app/(authenticated)/admin/logs/page.tsx (78-95). Submit each form
through handleSubmit and preserve the existing page-reset behavior in the valid
submit handlers.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: caa62ef7-f929-491c-83b0-9fd8e2a57130

📥 Commits

Reviewing files that changed from the base of the PR and between 9596543 and 4be2797.

📒 Files selected for processing (8)
  • apps/web/app/(authenticated)/admin/accounts/page.tsx
  • apps/web/app/(authenticated)/admin/layout.tsx
  • apps/web/app/(authenticated)/admin/logs/page.tsx
  • apps/web/app/(authenticated)/admin/page.tsx
  • apps/web/app/(authenticated)/admin/projects/page.tsx
  • apps/web/app/(authenticated)/layout.tsx
  • apps/web/components/admin/admin-ui.tsx
  • apps/web/components/top-navbar.tsx

Comment on lines +107 to 124
<form
className="flex flex-1 flex-col gap-2 sm:flex-row"
onSubmit={submitSearch}
>
<Input
value={searchInput}
onChange={(event) => setSearchInput(event.target.value)}
placeholder="Search email, name, organization, or GitHub username"
aria-label="Search accounts"
/>
<Button type="submit" variant="outline">
<Button
type="submit"
variant="outline"
className="w-full sm:w-auto"
>
Search
</Button>
</form>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Use the required form pattern.

Replace these controlled native forms with react-hook-form and zodResolver. Pass each schema from @repo/contracts. Keep the page-reset behavior in the valid submit handler.

  • apps/web/app/(authenticated)/admin/accounts/page.tsx#L107-L124: Use the account-search schema and handleSubmit.
  • apps/web/app/(authenticated)/admin/projects/page.tsx#L105-L122: Use the project-search schema and handleSubmit.
  • apps/web/app/(authenticated)/admin/logs/page.tsx#L78-L95: Use the audit-log-search schema and handleSubmit.

As per coding guidelines: apps/web/app/**/*.tsx: Use react-hook-form with zodResolver for forms, passing the schema from @repo/contracts.

📍 Affects 3 files
  • apps/web/app/(authenticated)/admin/accounts/page.tsx#L107-L124 (this comment)
  • apps/web/app/(authenticated)/admin/projects/page.tsx#L105-L122
  • apps/web/app/(authenticated)/admin/logs/page.tsx#L78-L95
🤖 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 `@apps/web/app/`(authenticated)/admin/accounts/page.tsx around lines 107 - 124,
Replace the controlled native search forms with react-hook-form configured
through zodResolver and the corresponding schema from `@repo/contracts`: use the
account-search schema in apps/web/app/(authenticated)/admin/accounts/page.tsx
(107-124), the project-search schema in
apps/web/app/(authenticated)/admin/projects/page.tsx (105-122), and the
audit-log-search schema in apps/web/app/(authenticated)/admin/logs/page.tsx
(78-95). Submit each form through handleSubmit and preserve the existing
page-reset behavior in the valid submit handlers.

Source: Coding guidelines

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant