Skip to content

feat: add right-sidebar content with top questions and popular tags#24

Merged
michellepace merged 11 commits intomainfrom
feat/right-sidebar_content
Jan 1, 2026
Merged

feat: add right-sidebar content with top questions and popular tags#24
michellepace merged 11 commits intomainfrom
feat/right-sidebar_content

Conversation

@michellepace
Copy link
Owner

Summary

  • Add right sidebar component displaying top questions and popular tags
  • Create QuestionLink and TagLink components with hover microinteractions
  • Implement data layer (lib/data/) with mock data ready for MongoDB integration
  • Add placeholder pages for /question/[id] and /tags/[slug] routes
  • Install shadcn Badge component
  • Add CSS custom properties for tag theming (light/dark mode)
  • Standardise navigation file naming conventions

Changes

Area Files
Components right-sidebar/, ui/badge.tsx
Data layer lib/data/questions.ts, lib/data/tags.ts
Pages question/[id]/page.tsx, tags/[slug]/page.tsx
Styling globals.css (tag theme variables)
Layout app/(root)/layout.tsx

Branch Summary

  1. Replaces skeleton placeholders with real content
  2. Establishes a clean data layer pattern ready for MongoDB
  3. Adds modern microinteractions (Tailwind-only, no JS libraries)
  4. Follows project conventions consistently
  5. Refactors file structure for better organisation

Test plan

  • npm run check passes (lint + typecheck)
  • npm run test passes (Vitest + Playwright)
  • Right sidebar visible on XL screens
  • Question links navigate to /question/{id}
  • Tag links navigate to /tags/{slug}
  • Hover microinteractions work (chevron translation, tag lift)
  • Dark mode styling correct

🤖 Generated with Claude Code

michellepace and others added 9 commits December 31, 2025 21:40
File renames:

- desktop-top-bar → desktop-topbar
- mobile-top-bar → mobile-topbar
- mobile-nav-link → mobile-navlink

Structure:

- Move right-sidebar.tsx to dedicated components/right-sidebar/ folder
- Update import paths in layout.tsx and mobile-nav.tsx

Standardises compound word naming (removing hyphens). The right-sidebar folder
prepares for Phase II components (question-link.tsx, tag-badge.tsx).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds Badge component from shadcn/ui registry with CVA variants (default,
secondary, destructive, outline) and asChild polymorphism via Radix Slot.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Playwright MCP:
- Add browser_fill_form, browser_hover, browser_press_key, browser_type

Bash commands:
- Add git diff, gh pr view, npx vercel wildcards

Expands Claude's auto-approved tool permissions for browser testing and CLI operations,
reducing interaction prompts during development workflows.
Components:
- Add QuestionLink with multi-line title and ChevronRight icon
- Add TagLink with Badge toptag variant and question count
- Add toptag Badge variant (uppercase, secondary colours)

Data Layer:
- Add lib/data/questions.ts with getTopQuestions() async function
- Add lib/data/tags.ts with getPopularTags() async function
- Export Question and Tag types for reuse

Routes:
- Add /question/[id] placeholder page
- Add /tags/[slug] placeholder page

Replace skeleton placeholders with functional content. Data layer uses async
functions ready for MongoDB integration. RightSidebar now fetches data via
Promise.all for parallel loading.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Documentation:

- Document two-layer animation stack: Tailwind CSS for base, Motion for advanced
- Include decision tree for choosing between Tailwind and Motion
- Cover shadcn/ui integration patterns (wrapper, motion component, pre-built)
- Define centralised motion tokens approach for globals.css

Provides a reference guide for implementing microinteractions in the DevFlow
project, covering bundle considerations, accessibility, and v0 compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CSS Variables:

- Add --tag-bg and --tag-text with mode-specific OKLCH values
- Remove unused --mobile-nav variable and its @theme registration

Components:

- Update toptag variant to use bg-(--tag-bg) text-(--tag-text) with px-4 py-2
- Switch mobile-nav background from bg-mobile-nav to bg-sidebar
- Remove font-semibold from tag question count

Tag badges now match pic1-target.jpg. Using CSS variable shorthand syntax
(Tailwind 4) allows dark mode to work via cascade without dark: variants.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
QuestionLink:
- Remove dated `hover:bg-accent/50` background overlay
- Add underline reveal on hover with muted decoration colour
- Animate chevron icon 2px right on hover with 150ms transition

Replaces heavy background overlay with subtle, Linear-inspired hover effects
that draw attention without obscuring surrounding content.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
TagLink:
- Replace bg-accent/50 overlay with subtle translate-y and scale on hover
- Move toptag styles inline to Badge className
- Reduce count text size and use muted colour

Badge:
- Remove custom toptag variant, revert to pristine shadcn

Keeps badge.tsx aligned with upstream shadcn for easier updates. The lift effect
provides tactile feedback without the dated background overlay.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Implementation summary for sidebar components and data layer
- Visual reference screenshots (target design and current state)
- Notes on tag styling alignment and microinteraction changes
- Draft requirements for future Devicon integration

Historical record of the right-sidebar feature development decisions and next steps.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 1, 2026

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

Project Deployment Review Updated (UTC)
devflow Ready Ready Preview, Comment Jan 1, 2026 6:45pm

@coderabbitai
Copy link

coderabbitai bot commented Jan 1, 2026

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • New Features

    • Dedicated pages for individual questions and tags with dynamic routing
    • Right sidebar now loads and displays top questions and popular tags
    • Reusable badge component plus tag and question link UI
  • Style

    • Theme-aware tag visuals for light and dark modes
    • Refined mobile navigation and sidebar presentation
  • Documentation

    • Added right-sidebar handover and a microinteractions guide
  • Tests

    • Added end-to-end tests for the right sidebar and unit tests for data helpers
  • Chores

    • Removed demo price-formatting utility and its test

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds a right-sidebar feature with async server rendering and mock data sources, new question and tag routes, badge/tag CSS tokens, navigation import path updates, Playwright/Bash permissions, UI components (Badge, QuestionLink, TagLink), tests and E2E coverage, and supporting documentation.

Changes

Cohort / File(s) Summary
Configuration & Permissions
\.claude/settings.json
Added allowed entries: mcp__playwright__browser_fill_form, mcp__playwright__browser_hover, mcp__playwright__browser_press_key, mcp__playwright__browser_type, plus Bash patterns Bash(git diff:*), Bash(gh pr view:*), Bash(npx vercel:*).
Layout & Navigation
app/(root)/layout.tsx, components/navigation/mobile-nav.tsx
Updated component import paths (dash → no-dash filenames); adjusted SheetContent class from bg-mobile-navbg-sidebar; RightSidebar import path updated.
New Page Routes
app/(root)/question/[id]/page.tsx, app/(root)/tags/[slug]/page.tsx
Added async server pages that await params and render placeholder headings for question ID and tag slug.
Styling & Theming
app/globals.css
Removed --color-mobile-nav mapping; added public CSS variables --tag-bg and --tag-text in both light and dark theme blocks.
Right Sidebar UI Components
components/right-sidebar/question-link.tsx, components/right-sidebar/tag-link.tsx, components/ui/badge.tsx
Added QuestionLink, TagLink, and a CVA-based Badge component (variants + asChild support).
Right Sidebar Container
components/right-sidebar/right-sidebar.tsx
Converted to an async server component; concurrently fetches getTopQuestions(5) and getPopularTags(5) and renders mapped QuestionLink / TagLink lists replacing skeletons.
Data Layer
lib/data/questions.ts, lib/data/tags.ts
Added Question and Tag types, mock datasets, and async getters getTopQuestions(limit) and getPopularTags(limit) (TODO: replace with DB queries).
Tests & E2E
e2e/right-sidebar.desktop.spec.ts, lib/data/questions.test.ts, lib/data/tags.test.ts, lib/formatPrice.test.ts
Added Playwright E2E for right-sidebar; added unit tests for questions/tags; removed lib/formatPrice.test.ts.
Removed Utility
lib/formatPrice.ts
Deleted formatPrice utility and its export.
Docs
x_docs/mine/2026-01-01-right-sidebar/handover.md, x_docs/mine/micro-interactions.md
Added handover and microinteractions guidance documenting implementation, verification, and animation strategy.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Page as Server Page
    participant RS as RightSidebar (async)
    participant QSvc as getTopQuestions()
    participant TSvc as getPopularTags()
    participant QL as QuestionLink
    participant TL as TagLink

    Page->>RS: render RightSidebar
    activate RS
    Note right of RS `#f0f4ff`: Async server component\nuses Promise.all
    par Concurrent fetch
        RS->>QSvc: getTopQuestions(5)
        activate QSvc
        QSvc-->>RS: Promise<Question[]>
        deactivate QSvc
    and
        RS->>TSvc: getPopularTags(5)
        activate TSvc
        TSvc-->>RS: Promise<Tag[]>
        deactivate TSvc
    end
    RS->>RS: Promise.all resolves
    RS->>QL: map questions -> QuestionLink components
    RS->>TL: map tags -> TagLink components
    RS-->>Page: rendered sidebar HTML
    deactivate RS
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 A nibble of code, a sidebar grows,
Promises scurry where mock data flows.
Badges gleam bright in both light and shade,
Links hop along the routes we made.
Soon the DB will join the parade.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective of the PR: adding a right-sidebar component that displays top questions and popular tags, which is the primary focus of the changeset.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, covering the main features (right sidebar, QuestionLink, TagLink, data layer, placeholder pages, Badge component, CSS variables, and file naming standardisation).

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d45c672 and 52e2d15.

📒 Files selected for processing (6)
  • e2e/right-sidebar.desktop.spec.ts
  • lib/data/questions.test.ts
  • lib/data/tags.test.ts
  • lib/formatPrice.test.ts
  • lib/formatPrice.ts
  • x_docs/mine/2026-01-01-right-sidebar/handover.md

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.

Copy link

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

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cc4d963 and c9ea632.

⛔ Files ignored due to path filters (2)
  • x_docs/mine/2026-01-01-right-sidebar/current.jpg is excluded by !**/*.jpg
  • x_docs/mine/2026-01-01-right-sidebar/pic1-target.jpg is excluded by !**/*.jpg
📒 Files selected for processing (17)
  • .claude/settings.json
  • app/(root)/layout.tsx
  • app/(root)/question/[id]/page.tsx
  • app/(root)/tags/[slug]/page.tsx
  • app/globals.css
  • components/navigation/desktop-topbar.tsx
  • components/navigation/mobile-nav.tsx
  • components/navigation/mobile-navlink.tsx
  • components/navigation/mobile-topbar.tsx
  • components/right-sidebar/question-link.tsx
  • components/right-sidebar/right-sidebar.tsx
  • components/right-sidebar/tag-link.tsx
  • components/ui/badge.tsx
  • lib/data/questions.ts
  • lib/data/tags.ts
  • x_docs/mine/2026-01-01-right-sidebar/handover.md
  • x_docs/mine/micro-interactions.md
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx,md}

📄 CodeRabbit inference engine (CLAUDE.md)

Use British English throughout the codebase (comments, strings, documentation)

Files:

  • components/right-sidebar/tag-link.tsx
  • app/(root)/tags/[slug]/page.tsx
  • x_docs/mine/2026-01-01-right-sidebar/handover.md
  • components/right-sidebar/question-link.tsx
  • components/right-sidebar/right-sidebar.tsx
  • x_docs/mine/micro-interactions.md
  • app/(root)/layout.tsx
  • components/ui/badge.tsx
  • components/navigation/mobile-nav.tsx
  • lib/data/questions.ts
  • lib/data/tags.ts
  • app/(root)/question/[id]/page.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Only add "use client" directive when interactivity is needed
Avoid manual useMemo/useCallback unless profiling shows need

Files:

  • components/right-sidebar/tag-link.tsx
  • app/(root)/tags/[slug]/page.tsx
  • components/right-sidebar/question-link.tsx
  • components/right-sidebar/right-sidebar.tsx
  • app/(root)/layout.tsx
  • components/ui/badge.tsx
  • components/navigation/mobile-nav.tsx
  • lib/data/questions.ts
  • lib/data/tags.ts
  • app/(root)/question/[id]/page.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Always use @/ import aliases, even for sibling files (use @/app/fonts instead of ./fonts)

Files:

  • components/right-sidebar/tag-link.tsx
  • app/(root)/tags/[slug]/page.tsx
  • components/right-sidebar/question-link.tsx
  • components/right-sidebar/right-sidebar.tsx
  • app/(root)/layout.tsx
  • components/ui/badge.tsx
  • components/navigation/mobile-nav.tsx
  • lib/data/questions.ts
  • lib/data/tags.ts
  • app/(root)/question/[id]/page.tsx
**/*.css

📄 CodeRabbit inference engine (CLAUDE.md)

Tailwind CSS v4: Use @import "tailwindcss" syntax instead of @tailwind directives

Files:

  • app/globals.css
🧠 Learnings (6)
📚 Learning: 2025-12-10T20:20:46.607Z
Learnt from: michellepace
Repo: michellepace/devflow PR: 7
File: components/navigation/navbar/index.tsx:1-12
Timestamp: 2025-12-10T20:20:46.607Z
Learning: Clerk's Next.js components (SignedIn, SignedOut, SignInButton, SignUpButton, UserButton) from clerk/nextjs can be used inside Server Components without adding 'use client' in the consuming component. They manage client/server boundary internally. When reviewing code, prefer omitting 'use client' in server components that render these Clerk components and avoid introducing client directives solely for these components. This guideline helps maintain server/server boundary and reduce client bundle size.

Applied to files:

  • components/right-sidebar/tag-link.tsx
  • app/(root)/tags/[slug]/page.tsx
  • components/right-sidebar/question-link.tsx
  • components/right-sidebar/right-sidebar.tsx
  • app/(root)/layout.tsx
  • components/ui/badge.tsx
  • components/navigation/mobile-nav.tsx
  • app/(root)/question/[id]/page.tsx
📚 Learning: 2025-12-28T22:41:43.683Z
Learnt from: CR
Repo: michellepace/devflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-28T22:41:43.683Z
Learning: Applies to app/**/[*]/page.{ts,tsx} : Next.js 16: Dynamic route params must be awaited as they are now a Promise - use { params }: { params: Promise<{ id: string }> }

Applied to files:

  • app/(root)/tags/[slug]/page.tsx
  • app/(root)/question/[id]/page.tsx
📚 Learning: 2025-12-25T13:56:09.644Z
Learnt from: michellepace
Repo: michellepace/devflow PR: 18
File: components/navigation/content-top-bar.tsx:23-30
Timestamp: 2025-12-25T13:56:09.644Z
Learning: In the Grok-style layout for this project, authenticated user account controls (Clerk's UserButton) are placed in the sidebar footer (components/app-sidebar.tsx), not in the content top bar (components/navigation/content-top-bar.tsx). The content top bar only displays SignedOut authentication options (Sign in/Sign up buttons).

Applied to files:

  • app/(root)/layout.tsx
📚 Learning: 2025-12-25T13:56:02.914Z
Learnt from: michellepace
Repo: michellepace/devflow PR: 18
File: components/navigation/content-top-bar.tsx:23-30
Timestamp: 2025-12-25T13:56:02.914Z
Learning: In a Grok-style layout, move authenticated user controls (Clerk's UserButton) out of the top navigation and into the sidebar footer (e.g., components/app-sidebar.tsx). Ensure components/navigation/content-top-bar.tsx only renders SignedOut options (Sign in/Sign up). Apply this guideline to all TSX files under components/navigation to enforce consistent placement of authentication UI across the navigation layer.

Applied to files:

  • components/navigation/mobile-nav.tsx
📚 Learning: 2025-12-25T15:46:08.787Z
Learnt from: michellepace
Repo: michellepace/devflow PR: 18
File: lib/utils.ts:17-19
Timestamp: 2025-12-25T15:46:08.787Z
Learning: In Tailwind CSS v4, the shorthand bg-(image:--gradient-primary) with parentheses is valid and equivalent to bg-[image:var(--gradient-primary)]. The michellepace/devflow repo standardizes on using the v4 shorthand syntax with parentheses for CSS variable references; when you need a Tailwind utility that references a CSS variable, prefer the shorthand form to maintain consistency across TypeScript files in the project (e.g., lib/**/*.ts).

Applied to files:

  • lib/data/questions.ts
  • lib/data/tags.ts
📚 Learning: 2025-12-30T21:09:31.840Z
Learnt from: michellepace
Repo: michellepace/devflow PR: 23
File: app/globals.css:131-135
Timestamp: 2025-12-30T21:09:31.840Z
Learning: In CSS theme files, duplicating variable declarations in :root and .dark blocks is intentional to keep a parallel structure for readability and future maintenance. This pattern improves quick visual comparison and simplifies adding new themes. If you duplicate, ensure both blocks have identical values for the variables that are shared; consider centralizing truly shared tokens later only if maintenance burden grows.

Applied to files:

  • app/globals.css
🧬 Code graph analysis (4)
components/right-sidebar/tag-link.tsx (3)
components/ui/badge.tsx (1)
  • Badge (46-46)
app/(root)/tags/page.tsx (1)
  • TagsPage (1-3)
app/(root)/page.tsx (1)
  • tag (59-66)
app/(root)/tags/[slug]/page.tsx (2)
app/(root)/tags/page.tsx (1)
  • TagsPage (1-3)
app/(root)/page.tsx (2)
  • h1 (1-99)
  • tag (59-66)
components/right-sidebar/right-sidebar.tsx (4)
lib/data/questions.ts (1)
  • getTopQuestions (30-33)
lib/data/tags.ts (1)
  • getPopularTags (18-21)
components/right-sidebar/question-link.tsx (1)
  • QuestionLink (9-21)
components/right-sidebar/tag-link.tsx (1)
  • TagLink (9-23)
components/ui/badge.tsx (1)
lib/utils.ts (1)
  • cn (4-6)
🪛 LanguageTool
x_docs/mine/2026-01-01-right-sidebar/handover.md

[uncategorized] ~18-~18: The official spelling of this programming framework is “Next.js”.
Context: ...s/[slug]/page.tsx| Placeholder page —/tags/nextjs` | > URL strategy: Questions use n...

(NODE_JS)


[grammar] ~49-~49: A determiner may be missing.
Context: ...tag-link.tsx` to the target design. Use recommended best pragmatic practice of centralised themi...

(THE_SUPERLATIVE)


[style] ~49-~49: Would you like to use the Oxford spelling “centralized”? The spelling ‘centralised’ is also correct.
Context: ... recommended best pragmatic practice of centralised theming (CSS custom properties in `app/...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~64-~64: Would you like to use the Oxford spelling “centralized”? The spelling ‘centralised’ is also correct.
Context: ...— Next.js 15, Tailwind config). Examine centralised theming in app/globals.css and evalua...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~97-~97: Would you like to use the Oxford spelling “normalized”? The spelling ‘normalised’ is also correct.
Context: ...er automatically for user-created tags (normalised) when a matching devicon exists. If no ...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~99-~99: Would you like to use the Oxford spelling “formalized”? The spelling ‘formalised’ is also correct.
Context: ...raft details in <draft> tags, will be formalised later: ### Approach (to be de...

(OXFORD_SPELLING_Z_NOT_S)


[typographical] ~125-~125: Do not use a colon (:) before a series that is introduced by a preposition (‘for’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ...Verified: - [ ] Icons render correctly for: nextjs, react, javascript, postgres - [...

(RP_COLON)


[uncategorized] ~125-~125: The official spelling of this programming framework is “Next.js”.
Context: ...ied: - [ ] Icons render correctly for: nextjs, react, javascript, postgres - [ ] Alia...

(NODE_JS)

x_docs/mine/micro-interactions.md

[style] ~3-~3: Would you like to use the Oxford spelling “centralized”? The spelling ‘centralised’ is also correct.
Context: ... guidance for shadcn/ui integration and centralised theming. --- ## The Recommended Stack...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~126-~126: Would you like to use the Oxford spelling “Centralized”? The spelling ‘Centralised’ is also correct.
Context: ...tion's conditional animations. --- ## Centralised Theming in globals.css ### The Questio...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~199-~199: Would you like to use the Oxford spelling “Centralize”? The spelling ‘Centralise’ is also correct.
Context: ...lementing animations | ### What NOT to Centralise Avoid putting these in globals.css: -...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~329-~329: Would you like to use the Oxford spelling “Centralize”? The spelling ‘Centralise’ is also correct.
Context: ... } from "motion/react" ``` ### Step 3: Centralise Your Timing Tokens Add motion tokens t...

(OXFORD_SPELLING_Z_NOT_S)

🔇 Additional comments (19)
components/right-sidebar/question-link.tsx (1)

1-21: LGTM!

The component is correctly implemented as a server component with CSS-only hover microinteractions. The use of group-hover for the underline and chevron translate effects provides smooth, performant animations without requiring client-side JavaScript.

app/(root)/tags/[slug]/page.tsx (1)

1-8: LGTM!

The page correctly implements the Next.js 15 async params pattern by typing params as a Promise and awaiting it before destructuring. The placeholder implementation aligns with the PR objectives.

app/(root)/question/[id]/page.tsx (1)

1-8: LGTM!

The page correctly implements the Next.js 15 async params pattern, matching the same structure used in the tags page. The placeholder implementation is consistent and correct.

lib/data/questions.ts (1)

26-33: LGTM!

The async function signature is forward-compatible with the planned MongoDB integration mentioned in the TODO comment. While the current implementation is synchronous, maintaining the async signature now prevents breaking changes when the database query is implemented.

components/navigation/mobile-nav.tsx (2)

13-13: Import path is correctly configured.

The renamed file mobile-navlink.tsx exists at components/navigation/, and the import statement using the @/ alias is properly established. No further action required.


61-61: CSS variable for bg-sidebar is properly defined.

The --sidebar CSS variable is defined in globals.css in both light mode (oklch(1 0 0)) and dark mode (oklch(0.1783 0.0128 270.6)), and the bg-sidebar utility class is actively used throughout the codebase in multiple navigation and UI components. The change from bg-mobile-nav to bg-sidebar consolidates the styling consistently with the sidebar theming.

.claude/settings.json (1)

11-11: LGTM!

The added Playwright browser actions and Bash command permissions appropriately support the E2E testing and development workflows for the new interactive components introduced in this PR.

Also applies to: 12-12, 16-16, 22-22, 33-33, 37-37, 53-53

app/globals.css (1)

128-130: LGTM!

The new --tag-bg and --tag-text CSS custom properties for tag badges are properly defined in both light and dark themes with appropriate colour values. The parallel structure in :root and .dark blocks maintains consistency with the existing theming pattern.

Based on learnings, the duplicate structure aids readability and future maintenance.

Also applies to: 190-192

components/right-sidebar/tag-link.tsx (3)

1-7: LGTM!

The imports follow the @/ alias convention, and the TagLinkProps type definition is clear and appropriate for the component's requirements.


9-23: LGTM!

The component structure is clean and correctly implemented as a Server Component. The hover microinteractions use CSS-only transforms, and the conditional rendering of questionCount is appropriate. The absence of a "use client" directive is correct, as per coding guidelines.


15-15: Fix the Tailwind CSS v4 arbitrary value syntax for CSS variables.

The Badge className uses incorrect syntax for referencing CSS custom properties. Tailwind CSS v4 requires square brackets for arbitrary values, not parentheses.

🔎 Proposed fix for the CSS variable syntax
-      <Badge className="rounded-md border-transparent bg-(--tag-bg) px-4 py-2 uppercase text-(--tag-text)">
+      <Badge className="rounded-md border-transparent bg-[--tag-bg] px-4 py-2 uppercase text-[--tag-text]">
⛔ Skipped due to learnings
Learnt from: michellepace
Repo: michellepace/devflow PR: 18
File: lib/utils.ts:17-19
Timestamp: 2025-12-25T15:46:14.812Z
Learning: In Tailwind CSS v4, the shorthand syntax `bg-(image:--gradient-primary)` with parentheses is valid and equivalent to the traditional bracket syntax `bg-[image:var(--gradient-primary)]`. The project michellepace/devflow has standardized on using the v4 shorthand syntax with parentheses for CSS variable references.
Learnt from: CR
Repo: michellepace/devflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-28T22:41:43.683Z
Learning: Applies to **/*.css : Tailwind CSS v4: Use import "tailwindcss" syntax instead of tailwind directives
app/(root)/layout.tsx (1)

2-5: LGTM!

The updated import paths reflect the file reorganisation and naming standardisation described in the PR objectives. The changes improve code organisation without affecting runtime behaviour.

components/ui/badge.tsx (2)

1-5: LGTM!

The imports are minimal and appropriate. The type-only React import is a good practice, and the @/ alias convention is correctly followed.


28-46: LGTM!

The Badge component implementation is clean and follows shadcn/ui patterns. The polymorphic rendering via the asChild prop is correctly implemented, and the absence of a "use client" directive is appropriate since the component has no client-side interactivity.

components/right-sidebar/right-sidebar.tsx (2)

15-19: Well-structured parallel data fetching.

The use of Promise.all for concurrent fetching is appropriate and efficient. The async server component pattern is correctly applied here, avoiding the need for a "use client" directive.

Consider whether error handling is needed if getTopQuestions or getPopularTags could fail in production (e.g., when backed by MongoDB). Currently, a rejection would cause the entire component to fail silently.


39-46: LGTM!

The component mapping is clean, keys are appropriately unique (_id for questions, name for tags), and the props are correctly passed to child components.

Also applies to: 56-63

lib/data/tags.ts (1)

1-4: Clean type definition.

The Tag type is well-defined and appropriately exported for use across the codebase.

x_docs/mine/micro-interactions.md (1)

1-14: Comprehensive microinteractions guide.

Well-structured documentation covering the two-layer animation approach (Tailwind + Motion). The British English spellings ("centralised", "whilst", "colour") are correct per the coding guidelines—ignore the static analysis suggestions for American spellings.

x_docs/mine/2026-01-01-right-sidebar/handover.md (1)

1-7: Clear handover documentation.

Good practice to mark stale documentation explicitly. The British English spellings throughout ("centralised", "normalised", "formalised") are correct per the coding guidelines—the static analysis suggestions for American spellings should be disregarded.

Mock Data:
- Change "center" to "centre" in question title

Aligns mock data with project's British English requirement per CLAUDE.md.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@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

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9ea632 and d45c672.

📒 Files selected for processing (1)
  • lib/data/questions.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx,md}

📄 CodeRabbit inference engine (CLAUDE.md)

Use British English throughout the codebase (comments, strings, documentation)

Files:

  • lib/data/questions.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Only add "use client" directive when interactivity is needed
Avoid manual useMemo/useCallback unless profiling shows need

Files:

  • lib/data/questions.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Always use @/ import aliases, even for sibling files (use @/app/fonts instead of ./fonts)

Files:

  • lib/data/questions.ts
🧠 Learnings (2)
📚 Learning: 2025-12-28T22:41:43.683Z
Learnt from: CR
Repo: michellepace/devflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-28T22:41:43.683Z
Learning: Applies to **/*.{ts,tsx,js,jsx,md} : Use British English throughout the codebase (comments, strings, documentation)

Applied to files:

  • lib/data/questions.ts
📚 Learning: 2025-12-25T15:46:08.787Z
Learnt from: michellepace
Repo: michellepace/devflow PR: 18
File: lib/utils.ts:17-19
Timestamp: 2025-12-25T15:46:08.787Z
Learning: In Tailwind CSS v4, the shorthand bg-(image:--gradient-primary) with parentheses is valid and equivalent to bg-[image:var(--gradient-primary)]. The michellepace/devflow repo standardizes on using the v4 shorthand syntax with parentheses for CSS variable references; when you need a Tailwind utility that references a CSS variable, prefer the shorthand form to maintain consistency across TypeScript files in the project (e.g., lib/**/*.ts).

Applied to files:

  • lib/data/questions.ts
🔇 Additional comments (2)
lib/data/questions.ts (2)

1-4: Well-structured type definition.

The Question type is appropriately scoped for the right sidebar display, containing only the fields needed to render question links.


26-33: Excellent forward-compatible implementation.

The async function signature is correctly designed for future database integration, even though the current mock implementation doesn't require await. The TODO comment clearly documents the migration path, and the default limit parameter provides sensible behaviour.

E2E Tests:

- Add right-sidebar.desktop.spec.ts with navigation and responsive scroll tests
- Verify question/tag link routing with non-brittle regex URL patterns
- Test scrollbar presence at short viewport (650px) and absence at tall (1000px)
- Confirm sidebar hidden below xl breakpoint (1279px)

Unit Tests:

- Add questions.test.ts and tags.test.ts for data functions
- Test default limit, custom limit, and returned property structure
- Remove demo formatPrice utility and its test

Replaces placeholder tests with real coverage for right sidebar feature. Tests document
expected behaviour and will remain valid when mock data is replaced with database.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@michellepace michellepace merged commit fcf4a3b into main Jan 1, 2026
6 of 7 checks passed
@michellepace michellepace deleted the feat/right-sidebar_content branch January 1, 2026 18:53
@coderabbitai coderabbitai bot mentioned this pull request Jan 2, 2026
5 tasks
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.

1 participant