Skip to content

Conversation

@yamcodes
Copy link
Owner

@yamcodes yamcodes commented Sep 23, 2025

Summary by CodeRabbit

  • New Features

    • Replaced the interactive embed with a streamlined video demo on the homepage; clicking opens the live example in a new tab.
  • Chores

    • Removed StackBlitz integration, SDK, and related middleware/security framing headers.
    • Removed StackBlitz repo slug from example env and package config.
    • Updated the “Star us” link to derive from repo URL when present.
    • Added a development script and start command for the example project.
    • Minor homepage layout spacing adjusted.

- Added VideoDemo component
- Added arkenv-video.mov
- Updated home page
@changeset-bot
Copy link

changeset-bot bot commented Sep 23, 2025

⚠️ No Changeset found

Latest commit: 75ed0c6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 23, 2025

Warning

Rate limit exceeded

@yamcodes has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 55 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 e3ddefd and 75ed0c6.

📒 Files selected for processing (1)
  • apps/www/components/page/video-demo.tsx (1 hunks)

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Replaces the homepage StackBlitz embed with a VideoDemo, removes StackBlitz-specific middleware, env var and dependency, updates StarUsButton to derive owner/repo from a GitHub URL, reorders NODE_ENV in a playground config, and adds an example dev script and StackBlitz startCommand.

Changes

Cohort / File(s) Summary
Homepage demo swap
apps/www/app/(home)/page.tsx, apps/www/components/page/index.ts, apps/www/components/page/video-demo.tsx, apps/www/components/page/stackblitz-demo.tsx
Replace StackBlitzDemo usage with a new client VideoDemo component; remove the StackBlitzDemo component and its export; minor spacing adjustments on the homepage.
StackBlitz de-integration & env example
apps/www/middleware.ts, apps/www/.env.example, apps/www/package.json
Remove Next.js middleware that allowed StackBlitz framing, drop NEXT_PUBLIC_STACKBLITZ_GITHUB_REPO_SLUG from the env example, and remove the @stackblitz/sdk dependency (fumadocs-mdx entry repositioned).
Star button repo resolution
apps/www/components/page/star-us-button.tsx
Compute owner/repo from NEXT_PUBLIC_GITHUB_URL (or fallback) and use that to build the GitHub API and links; fetch logic unchanged otherwise.
Playground env ordering
apps/playgrounds/node/index.ts
Reorder the NODE_ENV entry inside the arkenv configuration object (positional change only; no semantic effect).
Example project config
examples/basic/package.json
Add dev:example npm script and a StackBlitz startCommand to run the example in the browser environment.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant HP as HomePage
  participant VD as VideoDemo (client)
  participant B as Browser
  participant SB as stackblitz.com

  U->>HP: Request "/"
  HP->>VD: Render VideoDemo client component
  VD->>B: Autoplay muted looping video (teaser)
  Note over VD,B: Visual teaser shown

  U->>VD: Click video/button
  VD->>B: window.open(StackBlitz URL, "_blank", "noopener,noreferrer")
  B->>SB: Open StackBlitz example in new tab
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Star us button #133 — Modifies StarUsButton implementation; related to the changes in how the GitHub repo/owner are derived and used.
  • Ts codeblock #161 — Touches the same NODE_ENV ordering in apps/playgrounds/node/index.ts.

Poem

A rabbit nudges play, a gentle glow,
A looping clip that whispers, "Come and go."
No embed headers, no SDK to bind,
A video opens code in a new tab, unlined.
I hop, I click, the repo stars shine—cheerful find! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
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.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Fix playground" is concise and directly related to the main changes in this PR, which focus on playground fixes such as replacing the StackBlitz embed with a VideoDemo, removing StackBlitz middleware and SDK, and updating env/examples and scripts; it communicates the primary intent clearly for a quick scan of history.

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.

@github-actions github-actions bot added example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory) www Improvements or additions to arkenv.js.org labels Sep 23, 2025
cursor[bot]

This comment was marked as outdated.

- Removed StackBlitz demo component
- Removed middleware for StackBlitz
- Removed env var and sdk dependency
- Reduced dark mode shadow intensity
- Wrapped video in a button
- Allows play on click
@yamcodes yamcodes linked an issue Sep 23, 2025 that may be closed by this pull request
- Removed embed params
- Removed duplicated source
@vercel
Copy link

vercel bot commented Sep 23, 2025

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

Project Deployment Preview Comments Updated (UTC)
arkenv Ready Ready Preview Comment Sep 23, 2025 5:09pm

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: 2

🧹 Nitpick comments (2)
examples/basic/package.json (1)

23-24: Simplify StackBlitz startCommand

StackBlitz installs deps automatically. Dropping the explicit npm install speeds startup and avoids duplicate installs.

Apply this diff:

-    "startCommand": "npm install && npm run dev:example"
+    "startCommand": "npm run dev:example"
apps/www/components/page/video-demo.tsx (1)

21-27: Optional: reduce load and improve UX for motion-sensitive users

Consider a poster and lighter preload to improve performance; optionally pause autoplay for prefers-reduced-motion.

Example:

-        <video
-          autoPlay
-          loop
-          muted
-          playsInline
-          className="block max-h-[600px] sm:max-h-[1000px] object-contain"
-        >
+        <video
+          autoPlay
+          loop
+          muted
+          playsInline
+          preload="metadata"
+          poster="/arkenv-video-poster.jpg"
+          className="block max-h-[600px] sm:max-h-[1000px] object-contain"
+        >

Optional in JS:

// Pause for users who prefer reduced motion
useEffect(() => {
  const m = window.matchMedia("(prefers-reduced-motion: reduce)");
  const el = document.querySelector("video");
  if (!el) return;
  const apply = () => (m.matches ? el.pause() : el.play().catch(() => {}));
  apply();
  m.addEventListener?.("change", apply);
  return () => m.removeEventListener?.("change", apply);
}, []);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 907e1b0 and d53b4e8.

⛔ Files ignored due to path filters (2)
  • apps/www/public/arkenv-video.mov is excluded by !**/*.mov
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • apps/playgrounds/node/index.ts (1 hunks)
  • apps/www/.env.example (0 hunks)
  • apps/www/app/(home)/page.tsx (2 hunks)
  • apps/www/components/page/index.ts (1 hunks)
  • apps/www/components/page/stackblitz-demo.tsx (0 hunks)
  • apps/www/components/page/star-us-button.tsx (2 hunks)
  • apps/www/components/page/video-demo.tsx (1 hunks)
  • apps/www/middleware.ts (0 hunks)
  • apps/www/package.json (1 hunks)
  • examples/basic/package.json (2 hunks)
💤 Files with no reviewable changes (3)
  • apps/www/.env.example
  • apps/www/middleware.ts
  • apps/www/components/page/stackblitz-demo.tsx
🧰 Additional context used
🧬 Code graph analysis (5)
apps/www/components/page/star-us-button.tsx (2)
apps/www/lib/utils/github.test.ts (2)
  • process (134-144)
  • getLinkTitleAndHref (149-149)
apps/www/lib/utils/github.ts (2)
  • path (25-32)
  • githubUrl (7-16)
apps/playgrounds/node/index.ts (1)
packages/arkenv/src/type.test.ts (4)
  • envType (80-102)
  • envType (76-76)
  • envType (123-123)
  • envType (5-9)
apps/www/components/page/video-demo.tsx (1)
apps/www/components/page/stackblitz-demo.tsx (2)
  • StackBlitzDemo (6-34)
  • embedRef (9-27)
apps/www/components/page/index.ts (1)
apps/www/components/page/stackblitz-demo.tsx (1)
  • StackBlitzDemo (6-34)
apps/www/app/(home)/page.tsx (1)
apps/www/components/page/video-demo.tsx (1)
  • VideoDemo (3-35)
🔇 Additional comments (7)
apps/playgrounds/node/index.ts (1)

6-6: LGTM: Reordering only; no behavioral change.

The NODE_ENV union-with-default definition looks correct for arkenv’s DSL. No issues spotted.

apps/www/components/page/index.ts (1)

5-5: LGTM – correct re-export

Exporting video-demo aligns with the homepage changes; StackBlitz export removal is reflected here.

apps/www/app/(home)/page.tsx (2)

3-3: LGTM – updated import

Switch to VideoDemo matches the new component export.


44-46: LGTM – layout tweak

Spacing and VideoDemo placement look good.

apps/www/components/page/video-demo.tsx (1)

28-29: Fix incorrect MIME types and sources

The same .mov file is declared as video/mp4, which can break playback. Either remove the incorrect source or provide real MP4/WEBM assets.

Minimal safe fix:

-          <source src="/https/github.com/arkenv-video.mov" type="video/quicktime" />
-          <source src="/https/github.com/arkenv-video.mov" type="video/mp4" />
+          <source src="/https/github.com/arkenv-video.mov" type="video/quicktime" />

Recommended (if you add assets):

<video ...>
  <source src="/arkenv-video.webm" type="video/webm" />
  <source src="/arkenv-video.mp4" type="video/mp4" />
  <source src="/arkenv-video.mov" type="video/quicktime" />
  Your browser does not support the video tag.
</video>
examples/basic/package.json (1)

8-8: Confirm examples/basic/.env.example is committed
dev:example depends on examples/basic/.env.example; sandbox search returned no match — add/commit examples/basic/.env.example so StackBlitz/local runs don't fail.

apps/www/package.json (1)

26-26: No @stackblitz/sdk imports remain — removal OK. Found no imports/usages of @stackblitz/sdk; only a hardcoded StackBlitz URL (apps/www/components/page/video-demo.tsx) and a "stackblitz" field in examples/basic/package.json remain — neither uses the SDK.

- Use env var for github repo
- Computed once, avoids repetition
- Added github url breakdown util
- Added aria-label to the play button for the demo video to improve accessibility.
@yamcodes yamcodes merged commit 7487664 into main Sep 23, 2025
8 of 9 checks passed
@yamcodes yamcodes deleted the fix-playground branch September 23, 2025 17:08
This was referenced Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory) www Improvements or additions to arkenv.js.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stackblitz Playground is not compatible with typescript and arkenv

2 participants