Skip to content

chore: cleanup#1984

Merged
mfts merged 3 commits intomainfrom
chore/update-deps
Jan 8, 2026
Merged

chore: cleanup#1984
mfts merged 3 commits intomainfrom
chore/update-deps

Conversation

@mfts
Copy link
Owner

@mfts mfts commented Jan 7, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced error handling and reporting in document processing workflows
  • Chores

    • Updated application navigation links
    • Reorganized imports for improved code maintainability

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

@vercel
Copy link

vercel bot commented Jan 7, 2026

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

Project Deployment Review Updated (UTC)
papermark Ready Ready Preview, Comment Jan 7, 2026 8:32am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

This PR updates Papermark link URLs from /home paths to root paths across navigation components and middleware, and reorganizes imports with enhanced error handling in the API documents endpoint.

Changes

Cohort / File(s) Summary
Navigation and UI Link Updates
components/view/access-form/index.tsx, components/view/dataroom/nav-dataroom.tsx, components/view/nav.tsx
Updated Papermark link hrefs by removing /home from URLs, changing from https://www.papermark.com/home to https://www.papermark.com while preserving query parameters and target behavior.
Middleware Root Path Redirect
lib/middleware/domain.ts
Changed root path redirect target from https://www.papermark.com/home to https://www.papermark.com. Maintains existing host-specific redirect logic and updated associated comment.
API Documents Endpoint
pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts
Reorganized imports (moved isTeamPausedById, localized SUPPORTED_AI_CONTENT_TYPES, repositioned getFeatureFlags); added serializeFileSize import; enhanced POST error handling with errorhandler and error-tagged logging; changed successful POST response payload to use serializeFileSize(dataroomDocument).

Possibly related PRs

  • PR #1890: Modifies the Papermark link href in components/view/access-form/index.tsx to update the navigation target.
  • PR #1983: Updates root-path redirect logic in lib/middleware/domain.ts to handle host-specific redirects.
  • PR #1916: Adds host-specific root redirect configuration in lib/middleware/domain.ts.
🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ 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.
Title check ❓ Inconclusive The title 'chore: cleanup' is vague and generic, failing to clearly describe the specific changes made across multiple files and components. Use a more descriptive title that captures the main changes, such as 'chore: update Papermark URLs from /home to root path' or 'chore: refactor Papermark navigation links and API response handling'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1ecef5 and ff01158.

📒 Files selected for processing (5)
  • components/view/access-form/index.tsx
  • components/view/dataroom/nav-dataroom.tsx
  • components/view/nav.tsx
  • lib/middleware/domain.ts
  • pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts
🧰 Additional context used
🧬 Code graph analysis (1)
pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts (2)
ee/features/ai/lib/trigger/types.ts (1)
  • SUPPORTED_AI_CONTENT_TYPES (80-84)
lib/utils.ts (1)
  • serializeFileSize (805-830)
⏰ 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). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (7)
components/view/access-form/index.tsx (1)

214-214: LGTM! Consistent URL update.

The Papermark link has been updated to point to the root domain, consistent with the other navigation changes across the PR.

lib/middleware/domain.ts (1)

9-41: LGTM! Root path redirect updated correctly.

The middleware now redirects to the root Papermark URL instead of /home, maintaining consistency with the navigation changes throughout the application. The host-specific redirect logic remains properly intact.

components/view/nav.tsx (1)

258-258: LGTM! Navigation link updated consistently.

The Papermark navigation link now points to the root domain while preserving the UTM tracking parameters.

components/view/dataroom/nav-dataroom.tsx (1)

144-144: LGTM! Dataroom navigation updated consistently.

The logo link has been updated to point to the root Papermark URL with UTM parameters intact, consistent with the navigation changes in other components.

pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts (3)

4-19: LGTM! Import organization improved.

The imports have been reorganized for better logical grouping, with the addition of serializeFileSize for response serialization and errorhandler for enhanced error handling.


219-223: LGTM! Improved readability.

The AI indexing condition has been formatted across multiple lines for better readability without any semantic changes.


317-323: LGTM! Enhanced error handling and response serialization.

The changes include:

  • Response now uses serializeFileSize() to properly convert BigInt fileSize fields to numbers for JSON serialization
  • Error handling enhanced with the errorhandler function and typed logging

These improvements ensure the API response is properly serializable and errors are handled consistently.


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.

@mfts mfts merged commit 4679a2a into main Jan 8, 2026
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant