Skip to content

feat/add-prefix-icons-and-mobile-sidebar#1959

Merged
ComputelessComputer merged 2 commits intomainfrom
feat/add-prefix-icons-and-mobile-sidebar
Nov 28, 2025
Merged

feat/add-prefix-icons-and-mobile-sidebar#1959
ComputelessComputer merged 2 commits intomainfrom
feat/add-prefix-icons-and-mobile-sidebar

Conversation

@ComputelessComputer
Copy link
Collaborator

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 28, 2025

📝 Walkthrough

Walkthrough

This PR adds mobile-responsive UI to the changelog view with a drawer-based sidebar navigation for small screens, and extends the MockWindow component with an optional prefixIcons prop for custom header icons. Changes include mobile detection, animated drawer interactions, and callback support for drawer navigation.

Changes

Cohort / File(s) Summary
MockWindow component
apps/web/src/components/mock-window.tsx
Adds optional prefixIcons prop to render custom left-aligned icons in the window header. Header padding changed from vertical to fixed height (h-[38px]). Conditional rendering logic for icons container when prop is provided.
Changelog mobile responsiveness
apps/web/src/routes/_view/changelog/$slug.tsx
Introduces mobile drawer sidebar (MobileSidebarDrawer) with animated overlay using Framer Motion. Adds useIsMobile hook for responsive detection. Extends ChangelogSidebar with optional onNavigate callback to close drawer on navigation. Improves HeroSection title sizing on smaller viewports.

Sequence Diagram

sequenceDiagram
    participant User
    participant Mobile as Mobile UI Layer
    participant Drawer as MobileSidebarDrawer
    participant Sidebar as ChangelogSidebar
    participant Content as ChangelogContent

    User->>Mobile: Load changelog (mobile viewport)
    activate Mobile
    Mobile->>Mobile: useIsMobile detects mobile
    Mobile->>Drawer: Render drawer (closed, hidden)
    Mobile->>Sidebar: Render menu button
    deactivate Mobile

    User->>Sidebar: Click menu button
    activate Sidebar
    Sidebar->>Mobile: Toggle drawerOpen state
    Mobile->>Drawer: Render with AnimatePresence
    Drawer->>Drawer: Overlay & panel slide in
    deactivate Sidebar

    User->>Sidebar: Click version link in drawer
    activate Sidebar
    Sidebar->>Sidebar: Invoke onNavigate callback
    Mobile->>Mobile: Close drawer (drawerOpen = false)
    Drawer->>Drawer: Animate panel slide out
    Content->>User: Display selected changelog
    deactivate Sidebar
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • MockWindow changes: Straightforward prop addition and conditional rendering (~5 min)
  • Changelog mobile drawer: State management, responsive conditionals, Framer Motion integration, and callback wiring warrant closer inspection (~15 min)
  • Multiple concerns to verify: mobile detection logic, drawer animation flow, navigation callback propagation, and responsive layout behavior

Possibly related PRs

Suggested reviewers

  • yujonglee

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the purpose and context of the prefix icons and mobile sidebar features.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes both main changes: adding prefix icons to MockWindow and mobile sidebar functionality to the changelog view.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-prefix-icons-and-mobile-sidebar

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

@netlify
Copy link

netlify bot commented Nov 28, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit ff4eafd
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6928fec1ba1ede0008334101
😎 Deploy Preview https://deploy-preview-1959--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 28, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit ff4eafd
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6928fec111bb970008041f78
😎 Deploy Preview https://deploy-preview-1959--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
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: 0

🧹 Nitpick comments (1)
apps/web/src/routes/_view/changelog/$slug.tsx (1)

274-274: Consider extracting the header height to avoid magic numbers.

The 49px value is derived from the header's padding and content height. If the header styling changes, this calculation could break silently.

+const DRAWER_HEADER_HEIGHT = 49; // px-4 py-3 + content
+
 function MobileSidebarDrawer({
   // ...
 }) {
   return (
     <AnimatePresence>
       {open && (
         <>
           {/* ... */}
           <motion.div className="...">
             <div className="flex items-center justify-between px-4 py-3 ...">
               {/* header content */}
             </div>
-            <div className="h-[calc(100%-49px)] overflow-hidden">
+            <div className={`h-[calc(100%-${DRAWER_HEADER_HEIGHT}px)] overflow-hidden`}>
               <ChangelogSidebar ... />
             </div>
           </motion.div>
         </>
       )}
     </AnimatePresence>
   );
 }

Alternatively, use flex-1 with a flex column layout to avoid the calculation entirely.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b3f4524 and ff4eafd.

📒 Files selected for processing (2)
  • apps/web/src/components/mock-window.tsx (2 hunks)
  • apps/web/src/routes/_view/changelog/$slug.tsx (7 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-motion.

Files:

  • apps/web/src/components/mock-window.tsx
  • apps/web/src/routes/_view/changelog/$slug.tsx
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/web/content/changelog/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:30.770Z
Learning: Applies to apps/web/content/changelog/** : Only include desktop-related changes in the changelog when reading through commits and diffs
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/web/content/changelog/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:29.314Z
Learning: Applies to apps/web/content/changelog/** : Only keep desktop-related changes when maintaining changelog entries from commits and diffs
📚 Learning: 2025-11-24T16:32:30.770Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/web/content/changelog/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:30.770Z
Learning: Applies to apps/web/content/changelog/** : Only include desktop-related changes in the changelog when reading through commits and diffs

Applied to files:

  • apps/web/src/routes/_view/changelog/$slug.tsx
📚 Learning: 2025-11-24T16:32:29.314Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/web/content/changelog/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:29.314Z
Learning: Applies to apps/web/content/changelog/** : Only keep desktop-related changes when maintaining changelog entries from commits and diffs

Applied to files:

  • apps/web/src/routes/_view/changelog/$slug.tsx
📚 Learning: 2025-11-24T16:32:19.706Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:19.706Z
Learning: Applies to **/*.{ts,tsx} : Use `motion/react` instead of `framer-motion`.

Applied to files:

  • apps/web/src/routes/_view/changelog/$slug.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Redirect rules - hyprnote-storybook
  • GitHub Check: Header rules - hyprnote-storybook
  • GitHub Check: Pages changed - hyprnote-storybook
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: ci (macos, macos-14)
  • GitHub Check: fmt
🔇 Additional comments (5)
apps/web/src/components/mock-window.tsx (1)

9-16: LGTM!

Clean extension of the MockWindow component. The prefixIcons prop is well-positioned after the window controls, and the fixed height ensures consistent header dimensions regardless of content.

Also applies to: 29-38

apps/web/src/routes/_view/changelog/$slug.tsx (4)

4-4: LGTM!

Correctly imports from motion/react as per coding guidelines.

Also applies to: 13-13


120-120: LGTM!

Good responsive typography adjustment for smaller screens.


166-204: LGTM!

Good mobile-responsive implementation with proper separation between mobile drawer and desktop split view. The useState for drawer visibility is appropriate here as it's local UI state, not form/mutation state. The menu button includes proper accessibility labeling.


310-317: LGTM!

Clean callback pattern. The optional onNavigate prop allows the mobile drawer to close on navigation while keeping the desktop usage unchanged.

Also applies to: 361-361

@argos-ci
Copy link

argos-ci bot commented Nov 28, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
web (Inspect) ⚠️ Changes detected (Review) 2 changed Nov 28, 2025, 1:48 AM

@ComputelessComputer ComputelessComputer merged commit 4ebbd24 into main Nov 28, 2025
13 of 14 checks passed
@ComputelessComputer ComputelessComputer deleted the feat/add-prefix-icons-and-mobile-sidebar branch November 28, 2025 10:03
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

Comments