Skip to content

Conversation

@yujonglee
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Nov 18, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 9bdd298
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/691c0a6973fb940008986cdb
😎 Deploy Preview https://deploy-preview-1701--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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 18, 2025

Warning

Rate limit exceeded

@yujonglee has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 216e312 and 9bdd298.

📒 Files selected for processing (1)
  • apps/web/netlify/edge-functions/og.tsx (1 hunks)
📝 Walkthrough

Walkthrough

The changes remove a GitHub Actions deployment workflow, update Netlify configuration to adjust the publish path and remove edge function registration, and refactor the OG image generation edge function to use Zod schema validation with data-driven rendering based on query parameters.

Changes

Cohort / File(s) Summary
Deployment workflow removal
.github/workflows/web_cd.yaml
Removed entire GitHub Actions workflow that triggered on workflow_dispatch and pushes to main, executing pnpm install, build, and Netlify deployment steps.
Netlify configuration updates
apps/web/netlify.toml
Updated build publish path from dist/client to apps/web/dist/client; removed [[edge_functions]] block for the og edge function.
OG edge function refactoring
apps/web/netlify/edge-functions/og.tsx
Added Zod schema validation with templateSchema (meeting type) and OGSchema union; introduced parseSearchParams(url) to validate query parameters and renderTemplate(params) to dynamically render OG image with title and headers; updated handler to validate input and return 400 on invalid parameters.

Sequence Diagram

sequenceDiagram
    actor Client
    participant Handler as OG Handler
    participant Parser as parseSearchParams
    participant Renderer as renderTemplate
    participant Response as ImageResponse

    Client->>Handler: GET /og?title=...&headers=...
    Handler->>Parser: url (request URL)
    alt Valid Parameters
        Parser-->>Handler: OGSchema (parsed data)
        Handler->>Renderer: templateSchema (validated params)
        Renderer-->>Handler: React-like structure
        Handler->>Response: Create ImageResponse
        Response-->>Client: 200 OG Image
    else Invalid Parameters
        Parser-->>Handler: null
        Handler-->>Client: 400 Bad Request
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Review the Zod schema definitions and parseSearchParams logic to verify query parameter validation is comprehensive
  • Verify the renderTemplate function produces valid React structure for Netlify's ImageResponse
  • Confirm the handler error handling returns appropriate HTTP status codes

Possibly related PRs

  • PR #1700: Both PRs modify the Netlify OG edge function and its Netlify configuration registration; this PR refactors the handler and removes the edge function entry that was added in the related PR.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 2 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 is vague and generic, using 'attempt to fix' without clearly describing what the specific Netlify deployment issue is or what changes were made to address it. Provide a more descriptive title that specifies what aspect of the Netlify deployment is being fixed, such as 'Update Netlify deploy configuration for correct publish path' or 'Refactor OG image generation and remove deprecated workflow'.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to understand the rationale, context, or specific issues being addressed. Add a description explaining why the Netlify deployment configuration changes were needed, what problems they solve, and any breaking changes or migration steps for reviewers.

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
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 (2)
apps/web/netlify/edge-functions/og.tsx (2)

6-12: Consider documenting the intended extensibility pattern.

The OGSchema is defined as a discriminated union with a single template type ("meeting"). While this structure supports future template types, the current implementation only handles one case. If additional template types are planned, consider adding a comment documenting the intended extension pattern.


89-102: Consider adding caching headers to the ImageResponse.

The handler correctly validates input and returns appropriate errors. However, OG images are typically static for a given set of parameters and could benefit from HTTP caching to reduce regeneration overhead.

Apply this diff to add caching headers:

   // https://unpic.pics/og-edge
-  return new ImageResponse(renderTemplate(params));
+  return new ImageResponse(renderTemplate(params), {
+    headers: {
+      "Cache-Control": "public, max-age=31536000, immutable",
+    },
+  });

Note: Adjust the max-age value based on how frequently your OG image content changes.

📜 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 404c254 and 216e312.

📒 Files selected for processing (3)
  • .github/workflows/web_cd.yaml (0 hunks)
  • apps/web/netlify.toml (1 hunks)
  • apps/web/netlify/edge-functions/og.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/web_cd.yaml
⏰ 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: fmt
🔇 Additional comments (5)
apps/web/netlify/edge-functions/og.tsx (4)

14-25: LGTM!

The parsing logic correctly handles URL parameters, uses getAll for array values, and safely validates with Zod's safeParse method. The null return on invalid input integrates well with the error handling in the main handler.


27-87: LGTM!

The template rendering is well-structured with appropriate styling for OG image generation. The gradient background, centered card layout, and bullet-point headers create a visually appealing design suitable for social media previews.


104-108: Inline edge function configuration is correct and follows Netlify standards.

Netlify supports declaring edge functions entirely inline by exporting a config object from the function file, with no netlify.toml required. The implementation in og.tsx matches the documented pattern exactly, with valid path and cache properties. The removal of the [[edge_functions]] block from netlify.toml is appropriate and poses no issues.


3-4: Review comment is based on incorrect information.

The latest stable Zod npm version is 4.1.12 (published Oct 6, 2025), so Zod version 4 does exist and is actively maintained. The import npm:zod@^4 is valid and will correctly resolve to the latest v4.x release. No changes are required—the code will not fail at runtime due to this import.

Likely an incorrect or invalid review comment.

apps/web/netlify.toml (1)

3-3: Publish path configuration is correct.

TanStack Start produces client assets in dist/client by default, which aligns with the Netlify publish path set to "apps/web/dist/client". When the build command pnpm -F @hypr/web build runs from the monorepo root, vite outputs to the correct location. No changes needed.

@yujonglee yujonglee merged commit ef184ff into main Nov 18, 2025
8 checks passed
@yujonglee yujonglee deleted the yl-branch-14 branch November 18, 2025 06:02
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