Skip to content

Conversation

@ComputelessComputer
Copy link
Collaborator

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

📝 Walkthrough

Walkthrough

This PR refactors the blog post view layout from a multi-column structure with table of contents and sidebars into a simplified sectioned design. It updates related articles card rendering, modifies CTA sections across blog/docs/handbook pages, adjusts article filtering logic, and makes footer visibility changes in the routing layer.

Changes

Cohort / File(s) Summary
Blog Post View Refactoring
apps/web/src/routes/_view/blog/$slug.tsx
Major layout restructure: replaces multi-column design with HeroSection, SlashSeparator, ArticleContent, RelatedArticlesSection, and CTASection components. Removes cover image state and TableOfContents logic. Updates RelatedArticleCard to remove compact parameter and display dynamic ogImage. Introduces platform-aware CTA rendering using getPlatformCTA and usePlatform.
Blog Article Filtering
apps/web/src/routes/_view/blog/index.tsx
Tightens article filter from a.published !== false to a.published === true, excluding articles without explicit published flag set to true.
Handbook Layout Updates
apps/web/src/routes/_view/company-handbook/-components.tsx, apps/web/src/routes/_view/company-handbook/route.tsx
Removes ArticleFooter component. Updates RightSidebar CTA heading to "Try Hyprnote for yourself" and replaces founder link with /download link, changing button text to "Download for free". Adjusts LeftSidebar link padding from px-3 to pl-5 pr-3.
Docs Layout Updates
apps/web/src/routes/_view/docs/-components.tsx
Removes ArticleFooter component. Updates RightSidebar CTA heading and link semantics: changes heading to "Try Hyprnote for yourself" and replaces founders link with /download link, updating button text to "Download for free".
Root Route Footer
apps/web/src/routes/_view/route.tsx
Changes Footer rendering from conditional !isDocsPage to always rendering Footer across all pages.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Blog post view refactoring: Verify new component composition (HeroSection, RelatedArticlesSection, CTASection) maintains proper data flow and styling; check RelatedArticleCard signature removal for compact parameter doesn't break consuming code
  • Platform-aware CTA rendering: Confirm getPlatformCTA and usePlatform integration functions as expected with DownloadButton
  • Footer visibility change: Verify docs pages now properly render Footer and confirm no unintended visual issues result
  • Related articles: Confirm the filter change doesn't unintentionally exclude published articles and that RelatedArticlesSection properly handles the updated article list

Possibly related PRs

  • polished docs and blog page #1677: Modifies the same blog post view file with overlapping layout and section restructuring changes
  • ui fixes #1623: Modifies blog post view with overlapping cover-image and table-of-contents related changes
  • landing-2 #1598: Introduces the DownloadButton component that this PR integrates for platform-aware CTA rendering

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 whether any description exists that relates to the changeset. Add a pull request description explaining the motivation, changes made, and impact of removing the ArticleFooter and updating sidebar links.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately summarizes the main changes: removing the ArticleFooter component and updating sidebar CTA links across multiple pages.
✨ 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 refactor/remove-article-footer-sidebar-links

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

@netlify
Copy link

netlify bot commented Dec 2, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 8bd6f06
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/692e4a0d0cd83b00082e0a28
😎 Deploy Preview https://deploy-preview-2056--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 Dec 2, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 8bd6f06
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/692e4a0de6615f0008583142
😎 Deploy Preview https://deploy-preview-2056--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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/web/src/routes/_view/blog/$slug.tsx (2)

20-26: Redundant check - dead code.

The condition on line 24-26 is never reached because line 20 already throws notFound() when article.published !== true (which includes false).

  loader: async ({ params }) => {
    const article = allArticles.find((article) => article.slug === params.slug);
    if (!article || (!import.meta.env.DEV && article.published !== true)) {
      throw notFound();
    }

-    if (!import.meta.env.DEV && article.published === false) {
-      throw notFound();
-    }
-
    const relatedArticles = allArticles

40-42: Missing fallback for undefined updated date.

Using a.updated directly without a fallback will produce NaN when updated is undefined, causing unpredictable sort order. The index file correctly uses a.updated || a.created.

-        return new Date(b.updated).getTime() - new Date(a.updated).getTime();
+        const aDate = a.updated || a.created;
+        const bDate = b.updated || b.created;
+        return new Date(bDate).getTime() - new Date(aDate).getTime();
🧹 Nitpick comments (4)
apps/web/src/routes/_view/company-handbook/route.tsx (1)

90-94: LGTM! Padding adjustment aligns with PR objectives.

The increased left padding (pl-5) creates better visual hierarchy for the sidebar links. The change is intentional and correct.

Optional: Consider using cn utility for className logic.

As per coding guidelines, the conditional className logic could be refactored using the cn utility for better readability and maintainability:

import { cn } from "@hypr/utils";

// ...

className={cn([
  "block pl-5 pr-3 py-1.5 text-sm rounded-sm transition-colors",
  currentSlug === doc.slug
    ? "bg-neutral-100 text-stone-600 font-medium"
    : "text-neutral-600 hover:text-stone-600 hover:bg-neutral-50"
])}

Based on coding guidelines, prefer cn for conditional classNames to improve maintainability.

apps/web/src/routes/_view/route.tsx (1)

119-122: Consider using cn for conditional className composition

Both the MobileDocsDrawer container (Lines 119–122) and the docs links (Lines 158–162) manually interpolate conditional class strings. To better follow the TSX guidelines and improve readability, you could switch to cn from @hypr/utils and group base vs. conditional classes, e.g.:

import { cn } from "@hypr/utils";

<div
  className={cn(
    "fixed top-[69px] left-0 h-[calc(100vh-69px)] w-72 bg-white border-r border-neutral-100 shadow-2xl shadow-neutral-900/20 z-50 md:hidden transition-transform duration-300 ease-in-out",
    isOpen ? "translate-x-0" : "-translate-x-full",
  )}
>

and similarly for the active vs. inactive link styles.

Also applies to: 158-162

apps/web/src/routes/_view/blog/$slug.tsx (2)

102-106: Consider extracting shared constant.

AUTHOR_AVATARS is duplicated in both index.tsx and $slug.tsx. Extract to a shared module (e.g., @/constants/authors.ts) to keep them in sync.


307-309: Duplicated ogImage URL construction.

This logic is duplicated from the head() function (lines 51-53). Consider extracting to a shared helper function for consistency.

// Could be extracted to a helper, e.g.:
function getArticleOgImage(article: { coverImage?: string; title: string; author?: string; created?: string }) {
  return article.coverImage ||
    `https://hyprnote.com/og?type=blog&title=${encodeURIComponent(article.title)}${article.author ? `&author=${encodeURIComponent(article.author)}` : ""}${article.created ? `&date=${encodeURIComponent(new Date(article.created).toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric" }))}` : ""}`;
}
📜 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 4b191e1 and 8bd6f06.

📒 Files selected for processing (6)
  • apps/web/src/routes/_view/blog/$slug.tsx (5 hunks)
  • apps/web/src/routes/_view/blog/index.tsx (1 hunks)
  • apps/web/src/routes/_view/company-handbook/-components.tsx (1 hunks)
  • apps/web/src/routes/_view/company-handbook/route.tsx (1 hunks)
  • apps/web/src/routes/_view/docs/-components.tsx (1 hunks)
  • apps/web/src/routes/_view/route.tsx (1 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/routes/_view/company-handbook/route.tsx
  • apps/web/src/routes/_view/route.tsx
  • apps/web/src/routes/_view/blog/index.tsx
  • apps/web/src/routes/_view/company-handbook/-components.tsx
  • apps/web/src/routes/_view/docs/-components.tsx
  • apps/web/src/routes/_view/blog/$slug.tsx
🧠 Learnings (1)
📚 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/blog/$slug.tsx
🧬 Code graph analysis (3)
apps/web/src/routes/_view/route.tsx (1)
apps/web/src/components/footer.tsx (1)
  • Footer (10-315)
apps/web/src/routes/_view/docs/-components.tsx (2)
apps/storybook/stories/Button.stories.tsx (1)
  • Link (51-56)
packages/utils/src/cn.ts (1)
  • cn (20-22)
apps/web/src/routes/_view/blog/$slug.tsx (5)
apps/web/src/components/slash-separator.tsx (1)
  • SlashSeparator (1-8)
apps/web/src/hooks/use-platform.ts (2)
  • usePlatform (5-33)
  • getPlatformCTA (35-43)
apps/web/src/components/image.tsx (1)
  • Image (4-24)
apps/web/src/components/download-button.tsx (1)
  • DownloadButton (5-21)
packages/utils/src/cn.ts (1)
  • cn (20-22)
⏰ 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
  • GitHub Check: fmt
🔇 Additional comments (8)
apps/web/src/routes/_view/docs/-components.tsx (1)

168-180: LGTM! Clean CTA refactor.

The changes successfully update the sidebar CTA from a "Book a call" anchor to a "Download for free" link that navigates to /download. The use of TanStack Router's Link component is appropriate for client-side navigation, and the cn utility usage follows the coding guidelines correctly with array syntax and logical grouping.

apps/web/src/routes/_view/company-handbook/-components.tsx (1)

154-169: CTA implementation follows guidelines correctly

The Link to /download, copy, and styling are appropriate. The cn utility is correctly applied with logical grouping, and no unnecessary types or state management patterns are present.

apps/web/src/routes/_view/route.tsx (1)

53-53: Footer now always rendering looks consistent with global layout refactor

Making <Footer /> unconditional keeps the layout simple (flex-1 main + global footer) and matches the PR’s intent to centralize footer behavior instead of handling it specially per docs page. No functional issues from this change stand out.

apps/web/src/routes/_view/blog/index.tsx (1)

56-58: LGTM!

The stricter === true check correctly excludes articles where published is undefined or any other falsy value, ensuring only explicitly published articles appear in production.

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

108-150: LGTM!

Clean semantic structure with proper heading hierarchy and consistent date formatting.


200-244: LGTM!

Platform-aware CTA rendering is well-implemented with proper use of the usePlatform hook and conditional rendering.


246-304: LGTM!

Scroll-based visibility logic is correctly implemented with proper cleanup. Uses motion/react as per guidelines. Based on learnings, the motion import is correct.


80-100: LGTM!

Clean refactoring with well-separated concerns. The simplified sectioned layout improves readability and maintainability.

@ComputelessComputer ComputelessComputer merged commit 71bf5f8 into main Dec 2, 2025
14 checks passed
@ComputelessComputer ComputelessComputer deleted the refactor/remove-article-footer-sidebar-links branch December 2, 2025 02:13
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.

2 participants