Skip to content

Comments

Reference section navigation#1297

Draft
cjbell wants to merge 5 commits intomainfrom
cursor/reference-section-navigation-9dc9
Draft

Reference section navigation#1297
cjbell wants to merge 5 commits intomainfrom
cursor/reference-section-navigation-9dc9

Conversation

@cjbell
Copy link
Contributor

@cjbell cjbell commented Feb 3, 2026

Description

This PR introduces next/previous section navigation at the bottom of the API Reference, MAPI Reference, and CLI Reference pages.

Why:
To enhance the user experience and maintain consistency across the documentation, allowing users to easily navigate between top-level sections (e.g., Overview, Workflows, Messages) using the familiar Page.ContentFooter component, aligning with the design of other docs pages.

How:

  • Implemented getSectionNavigation helper functions within ApiReferenceLayout.tsx and CliReferenceLayout.tsx to determine the correct previous and next sections based on the current page's path.
  • Integrated the Page.ContentFooter component into these layouts, passing the calculated prevSection and nextSection props.
  • Ensured currentPath props were correctly set for the index.tsx (overview) pages of API and MAPI references to enable navigation from these entry points.

Todos

Tasks

Screenshots


Open in Cursor Open in Web

…pages

- Added getSectionNavigation helper to ApiReferenceLayout to compute prev/next sections
- Added Page.ContentFooter with section navigation to ApiReferenceLayout
- Added getSectionNavigation helper to CliReferenceLayout
- Added Page.ContentFooter with section navigation to CliReferenceLayout
- Added missing currentPath prop to api-reference and mapi-reference index pages

This allows users to navigate between sections (e.g., from /api-reference/overview to /api-reference/workflows) using next/previous buttons at the bottom of the page.

Co-authored-by: chris <chris@knock.app>
@cursor
Copy link

cursor bot commented Feb 3, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
docs Error Error Feb 24, 2026 4:06am

Request Review

Co-authored-by: chris <chris@knock.app>
cursoragent and others added 2 commits February 3, 2026 15:00
- Added useEffect to scroll to top when currentPath changes in ApiReferenceLayout
- Added useEffect to scroll to top when resource changes in CliReferenceLayout
- Removed unused useScrollToTop hook from CliReferenceLayout (was looking for non-existent .main-content class)

Co-authored-by: chris <chris@knock.app>
@vercel
Copy link

vercel bot commented Feb 3, 2026

Deployment failed with the following error:

Failed to create deployment for team_PPSNd7WJNxAW4IIAQAIAxQ9E in project prj_MUm0EYCUdisKHdballYPkbfnI6kI: FetchError: request to https://76.76.21.112/v13/now/deployments?ownerId=team_PPSNd7WJNxAW4IIAQAIAxQ9E&projectId=prj_MUm0EYCUdisKHdballYPkbfnI6kI&skipAutoDetectionConfirmation=1&teamId=team_PPSNd7WJNxAW4IIAQAIAxQ9E&traceCarrier=%7B%22ot-baggage-webhookAt%22%3A%221770132236906%22%2C%22ot-baggage-senderUsername%22%3A%22gh.cursor%5Bbot%5D%22%2C%22x-datadog-trace-id%22%3A%223243582423332234078%22%2C%22x-datadog-parent-id%22%3A%226089152305368681527%22%2C%22x-datadog-sampling-priority%22%3A%222%22%2C%22x-datadog-tags%22%3A%22_dd.p.tid%3D6982130c00000000%2C_dd.p.dm%3D-3%22%2C%22traceparent%22%3A%2200-6982130c000000002d0385075e6b235e-548103c290c04c37-01%22%2C%22tracestate%22%3A%22dd%3Dt.tid%3A6982130c00000000%3Bt.dm%3A-3%3Bs%3A2%3Bp%3A548103c290c04c37%22%7D failed, reason: socket hang up

@cjbell
Copy link
Contributor Author

cjbell commented Feb 24, 2026

@cursor please fix isues with this PR

@cursor
Copy link

cursor bot commented Feb 24, 2026

I've analyzed the PR and here's what I found:

PR Status

Code is working correctly:

  • TypeScript compilation passes with no errors
  • Prettier formatting check passes
  • The test CI check is passing

The only issue was a transient Vercel deployment failure:

  • The error "socket hang up" is a network/infrastructure issue on Vercel's side, not a code problem
  • I've pushed an empty commit to trigger a new deployment attempt

Summary of Changes in This PR

The PR adds next/previous section navigation to the API Reference, MAPI Reference, and CLI Reference pages:

  1. ApiReferenceLayout.tsx - Added getSectionNavigation helper and Page.ContentFooter component
  2. CliReferenceLayout.tsx - Added getSectionNavigation helper and Page.ContentFooter component
  3. api-reference/index.tsx - Added currentPath prop for navigation
  4. mapi-reference/index.tsx - Added currentPath prop for navigation

The new deployment should complete shortly. You can monitor the progress in the Vercel dashboard or PR checks.

Open in Web Open in Cursor 

Co-authored-by: Chris Bell <chris@cjbell.co>
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