Skip to content

Replace Project Dashboard page with an inline "About" dialog #207

Description

@JohnRDOrazio

Problem

/projects/[id]/dashboard is a 474-line page (app/projects/[id]/dashboard/page.tsx) whose current responsibilities largely duplicate or overlap with what's already reachable from the project page itself:

  • Open Viewer / Open Editor (line 268) — already directly available via the new ViewerEditorSwitcher shipped in PR feat: preserve entity selection across viewer/editor modes #104.
  • Name & description, team members — already shown in /projects/[id]/settings.
  • "Manage members, visibility, and project details" card (line 448) is just a deep-link to /settings#members.

The only information the dashboard surfaces that isn't already covered by the viewer / editor / settings pages is:

  1. Member count (line 222)
  2. Created / updated dates (line 225-227)
  3. Public / private badge (lines 197-206)
  4. The current user's membership level (their role in the project)

These four facts plus the name and description are all read-only / non-interactive. They don't justify a full page route, page header, navigation back-link, or 474 lines of layout code.

Proposal

Replace the dashboard page with a small About this project dialog reachable from the project page header (probably an (i) icon button next to the existing controls). The dialog renders:

  • Project name (heading)
  • Description (paragraph)
  • Public / private badge
  • Member count
  • Created date / Last updated date
  • Current user's role badge ("Owner", "Editor", "Viewer", or "Not a member")
  • A footer link to /projects/[id]/settings for users who actually want to manage things

That's it. No tabs, no cards, no Quick Actions section. The dialog should fit comfortably in a single column at ~28rem width.

Why this is a net win

Plan

1. New dialog component

components/projects/AboutProjectDialog.tsx:

interface AboutProjectDialogProps {
  project: Project; // already in scope on the project page via useProject
  isOpen: boolean;
  onClose: () => void;
}

Render using the existing Dialog / Modal primitive in the codebase (whatever PRCreateModal, CommitMessageDialog, etc. use). Pure presentation — takes project as a prop, no fetching of its own.

2. Trigger from the project page header

Add an Info lucide icon button in the viewer's header (next to ShareButton / LayoutDashboard) and editor's header. Replaces the existing Dashboard Link button — same icon slot, just a different click handler.

3. Delete the dashboard route

  • app/projects/[id]/dashboard/page.tsx — removed.
  • The two <Link href={\/projects/${projectId}/dashboard`}>references inapp/projects/[id]/page.tsx` (lines 100, 276) — replaced with the trigger button.
  • Any sitemap entries, navigation lists, or tests that reference /dashboard — updated.

4. Tests

  • New __tests__/components/projects/AboutProjectDialog.test.tsx — basic rendering with each role, public/private, member count edge cases (0, 1, many).
  • Update app/projects/[id]/page.test.tsx (if present) to assert the trigger button opens the dialog.
  • Delete the dashboard page test file if one exists.

Done criteria

  • /projects/[id]/dashboard route is removed; navigating to it returns a 404.
  • An "About" / info icon in the project header opens a dialog with the six fields listed above.
  • Settings still owns membership management, visibility settings, and project edits — no functionality moves into the dialog.
  • No regression to the viewer/editor switcher or any of the other header controls.
  • Sitemap (if it lists the dashboard) updated.

Out of scope

  • Adding analytics-style cards to the dialog (commit volume, recent activity, contributor heatmap, etc.). If those become useful later, the existing /projects/[id]/analytics page is the right place — not the About dialog.
  • Showing a "join project" call-to-action for non-members of public projects. The current dashboard has this; if it's still wanted, it can live in a separate "Join project" affordance reachable from the same icon button when the user has no role. (Open question — list it in the PR for discussion if implementing.)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions