Skip to content

Conversation

@arjunkomath
Copy link
Member

@arjunkomath arjunkomath commented Nov 29, 2025

Summary by CodeRabbit

  • New Features

    • Enhanced post status indicators with formatted publish timestamps
    • Improved responsive status display optimized for smaller screens
  • Updates

    • Streamlined homepage layout with reorganized content sections
    • Refined marketing messaging emphasizing platform positioning for modern teams
  • Tests

    • Added comprehensive end-to-end testing infrastructure

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

@vercel
Copy link

vercel bot commented Nov 29, 2025

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

Project Deployment Preview Updated (UTC)
changes-page Ready Ready Preview Nov 29, 2025 3:34am
2 Skipped Deployments
Project Deployment Preview Updated (UTC)
changes-page-docs Skipped Skipped Nov 29, 2025 3:34am
user-changes-page Skipped Skipped Nov 29, 2025 3:34am

@coderabbitai
Copy link

coderabbitai bot commented Nov 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds Playwright end-to-end testing infrastructure for the page application with configuration and test suite. Updates marketing content messaging in features and hero components. Enhances post component with DateTime-based publish-at formatting and audit logging. Restructures homepage by removing sections and reordering components.

Changes

Cohort / File(s) Change Summary
Page E2E Testing Setup
.github/workflows/page-e2e-tests.yml, apps/page/package.json, apps/page/playwright.config.js, apps/page/tests/page.spec.js, apps/page/.gitignore
Adds GitHub Actions workflow for manual Playwright test execution on ubuntu-latest with 10-minute timeout. Configures Playwright with Chromium project, CI-aware retries (2 on CI, 0 otherwise), HTML reporting, and screenshots on failure. Adds test scripts (test, test:headed) and @playwright/test dependency. Includes two test specs: page screenshot capture with API response validation and multi-endpoint API verification. Adds gitignore entries for Playwright artifacts.
Marketing Content Updates
apps/web/components/marketing/features.tsx, apps/web/components/marketing/hero.tsx
Updates features component messaging from "solution revolutionizing" to "platform for" and changes "changelog/roadmap" to "changelogs/roadmaps", appending "built for modern teams." Rewrites hero paragraph with rephrased feature description.
Post Component Enhancements
apps/web/components/post/post.tsx
Adds DateTime utility import and audit logging for delete operations. Introduces DateTime-based formatting for publish-at timestamps using DateTime.fromISO(...).toNiceFormat(). Refactors status UI layout with flex-wrap for responsive small-screen rendering and adjusts classNames for status display styling.
Homepage Refactoring
apps/web/pages/index.tsx
Removes "How it works", "Use cases", "Integrations", and Resources/Blog/Docs blocks; reorders remaining sections. Relocates FAQs to appear after GetStartedHero. Updates meta description for product messaging. Modifies GitHub star retrieval logic to use json.stargazers_count with radix 10 and bare catch clause.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Post component (apps/web/components/post/post.tsx): Review DateTime formatting integration and responsive layout changes for correctness and consistency across the component.
  • Homepage refactoring (apps/web/pages/index.tsx): Verify section removal logic, component reordering, and GitHub API star count retrieval changes are functioning as intended.
  • Playwright test coverage (apps/page/tests/page.spec.js): Confirm test assertions adequately validate page behavior and API endpoints, and that screenshot capture paths align with workflow artifact collection.

Possibly related PRs

  • Add audit logs for roadmaps #86: Modifies apps/web/components/post/post.tsx to add audit logging via createAuditLog in delete operations—the same audit logging integration introduced in this PR.

Poem

🐰 Our testing now springs forward with Playwright's might,
Pages capture screenshots in the night.
Marketing prose flows fresh and new,
While posts track changes, timestamps true.
The homepage leaps with joy so bright! ✨

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.
Title check ❓ Inconclusive The PR title 'Display scheduled time for posts' accurately reflects the main change of adding DateTime-based formatting for publish-at hints in the post status UI, but the changeset includes unrelated modifications to marketing pages, homepage layout, and an entirely new Playwright E2E testing setup. The title is partially related to the changeset as it describes only one aspect of the changes (post UI updates). Consider either: 1) Update the title to reflect the broader scope (e.g., 'Add E2E tests and update marketing pages and post scheduling display'), or 2) Split the PR into multiple focused PRs, each with a title reflecting its specific changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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.

@arjunkomath
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Nov 29, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link

@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

Caution

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

⚠️ Outside diff range comments (1)
apps/web/components/post/post.tsx (1)

169-192: Add missing dependencies to useCallback and consider audit log sequencing.

The callback correctly identifies that page.id and user.id are referenced in the closure but missing from the dependency array [supabase, fetchPosts]. This violates React's exhaustive-deps ESLint rule (enabled by default in Next.js) and could cause stale closures if page or user change.

Additionally, the post is deleted (line 174) before the audit log is created (lines 176–181). If createAuditLog fails, the deletion persists but no audit record is created, potentially compromising audit trail integrity.

Apply this diff:

     },
-    [supabase, fetchPosts]
+    [supabase, fetchPosts, page, user]
   );

Consider whether deleting before logging is acceptable, or implement error handling to roll back the deletion if audit logging fails.

🧹 Nitpick comments (5)
apps/web/components/post/post.tsx (2)

279-298: Desktop status display correctly shows scheduled publish time.

The large-screen status panel properly displays the publish time for scheduled posts using the same DateTime formatting.

The status display logic is duplicated between the mobile view (lines 229-250) and desktop view (lines 279-298). Consider extracting this into a reusable component to follow DRY principles and simplify future maintenance.


220-251: DateTime.fromISO() lacks validation but guard check provides basic protection; unnecessary ternary on line 222 confirmed.

The code functions correctly with appropriate guards. The DateTime.fromISO() implementation uses JavaScript's new Date() directly without validation, meaning malformed ISO strings would silently create an Invalid Date that displays as "Invalid Date" in toNiceFormat(). However, this is mitigated by the guard condition post.status === PostStatus.publish_later && post.publish_at on line 243, which checks truthiness. The real-world risk is low since publish_at should be server-validated before reaching the client.

The ternary expression idx ? "" : "" on line 222 is confirmed as unnecessary—both branches return empty strings and can be simplified or removed entirely.

apps/page/tests/page.spec.js (2)

3-23: Consider closing the request context to prevent resource leaks.

The request.newContext() at line 12 creates an HTTP context that should be explicitly closed after use. While Playwright may clean up some resources automatically, it's best practice to close contexts explicitly, especially in test suites that may run many tests.

Apply this diff to ensure proper cleanup:

 test("visit page and take screenshot", async ({ page }) => {
   const targetUrl = process.env.ENVIRONMENT_URL || "https://hey.changes.page";
 
   const response = await page.goto(targetUrl);
 
   expect(response.status()).toBeLessThan(400);
 
   await page.screenshot({ path: "screenshot.jpg" });
 
   const context = await request.newContext({
     baseURL: targetUrl,
   });
 
-  const latest = await context.get(`/latest.json`);
-  expect(latest.ok()).toBeTruthy();
+  try {
+    const latest = await context.get(`/latest.json`);
+    expect(latest.ok()).toBeTruthy();
 
-  const latestPost = await latest.json();
-  const latestPostResponse = await page.goto(latestPost.url);
-  expect(latestPostResponse.status()).toBeLessThan(400);
-  await page.screenshot({ path: "latestPostResponse-screenshot.jpg" });
+    const latestPost = await latest.json();
+    const latestPostResponse = await page.goto(latestPost.url);
+    expect(latestPostResponse.status()).toBeLessThan(400);
+    await page.screenshot({ path: "latestPostResponse-screenshot.jpg" });
+  } finally {
+    await context.dispose();
+  }
 });

25-49: Consider closing the request context to prevent resource leaks.

Similar to the first test, the request.newContext() at line 28 should be explicitly closed after use.

Apply this diff to ensure proper cleanup:

 test("verify APIs", async () => {
   const targetUrl = process.env.ENVIRONMENT_URL || "https://hey.changes.page";
 
   const context = await request.newContext({
     baseURL: targetUrl,
   });
 
-  const posts = await context.get(`/changes.json`);
-  expect(posts.ok()).toBeTruthy();
+  try {
+    const posts = await context.get(`/changes.json`);
+    expect(posts.ok()).toBeTruthy();
 
-  const robots = await context.get(`/robots.txt`);
-  expect(robots.ok()).toBeTruthy();
+    const robots = await context.get(`/robots.txt`);
+    expect(robots.ok()).toBeTruthy();
 
-  const sitemap = await context.get(`/sitemap.xml`);
-  expect(sitemap.ok()).toBeTruthy();
+    const sitemap = await context.get(`/sitemap.xml`);
+    expect(sitemap.ok()).toBeTruthy();
 
-  const markdown = await context.get(`/changes.md`);
-  expect(markdown.ok()).toBeTruthy();
+    const markdown = await context.get(`/changes.md`);
+    expect(markdown.ok()).toBeTruthy();
 
-  const rss = await context.get(`/rss.xml`);
-  expect(rss.ok()).toBeTruthy();
+    const rss = await context.get(`/rss.xml`);
+    expect(rss.ok()).toBeTruthy();
 
-  const atom = await context.get(`/atom.xml`);
-  expect(atom.ok()).toBeTruthy();
+    const atom = await context.get(`/atom.xml`);
+    expect(atom.ok()).toBeTruthy();
+  } finally {
+    await context.dispose();
+  }
 });
apps/page/playwright.config.js (1)

1-20: LGTM! Consider adding additional browser coverage.

The Playwright configuration is well-structured with appropriate CI-aware settings. The single Chromium project is functional, but consider adding Firefox and WebKit projects for broader browser coverage.

If broader coverage is desired, add these projects:

projects: [
  {
    name: "chromium",
    use: { ...devices["Desktop Chrome"] },
  },
  {
    name: "firefox",
    use: { ...devices["Desktop Firefox"] },
  },
  {
    name: "webkit",
    use: { ...devices["Desktop Safari"] },
  },
],
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c3bb57b and 025568b.

⛔ Files ignored due to path filters (2)
  • apps/web/public/images/hero/app-screenshot.png is excluded by !**/*.png
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • .github/workflows/page-e2e-tests.yml (1 hunks)
  • apps/page/.gitignore (1 hunks)
  • apps/page/package.json (2 hunks)
  • apps/page/playwright.config.js (1 hunks)
  • apps/page/tests/page.spec.js (1 hunks)
  • apps/web/components/marketing/features.tsx (1 hunks)
  • apps/web/components/marketing/hero.tsx (1 hunks)
  • apps/web/components/post/post.tsx (5 hunks)
  • apps/web/pages/index.tsx (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
apps/page/tests/page.spec.js (1)
apps/page/playwright.config.js (1)
  • require (1-1)
apps/web/components/post/post.tsx (3)
packages/ui/components/PostTypes.tsx (1)
  • PostTypeBadge (89-116)
packages/supabase/types/page.ts (1)
  • PostStatusToLabel (60-67)
packages/utils/datetime/index.ts (1)
  • DateTime (70-70)
apps/page/playwright.config.js (1)
apps/page/tests/page.spec.js (1)
  • require (1-1)
🪛 GitHub Check: CodeQL
.github/workflows/page-e2e-tests.yml

[warning] 8-45: Workflow does not contain permissions
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}

🔇 Additional comments (8)
apps/web/components/marketing/hero.tsx (1)

115-119: LGTM! Marketing content updated.

The updated hero paragraph provides a clearer description of the platform's capabilities, aligning with the messaging refresh across marketing components.

apps/web/components/marketing/features.tsx (1)

96-104: LGTM! Consistent messaging update.

The updated heading provides clearer positioning of the platform, consistent with the marketing refresh in hero.tsx.

apps/web/pages/index.tsx (3)

23-23: LGTM! Meta description updated.

The updated meta description aligns with the refreshed marketing messaging and provides clear value propositions.


135-135: LGTM! Component reordering.

The FAQs component positioning after GetStartedHero is appropriate for the restructured homepage flow.


160-161: LGTM! Code quality improvements.

The changes improve code quality:

  • Adding radix 10 to parseInt is a best practice that ensures consistent decimal parsing and avoids potential octal interpretation issues.
  • The bare catch clause is valid ES2019+ syntax and is cleaner when the error object isn't used.
apps/web/components/post/post.tsx (1)

11-11: LGTM! Imports support scheduled post display and audit logging.

The DateTime utility enables formatting of scheduled publish times, and createAuditLog provides proper audit trail for post deletions.

Also applies to: 20-20

apps/page/.gitignore (1)

10-12: LGTM! Standard Playwright ignore patterns.

The added ignore patterns for Playwright test artifacts are appropriate and follow best practices.

.github/workflows/page-e2e-tests.yml (1)

12-45: LGTM! Workflow steps are well-configured.

The workflow steps follow best practices:

  • Uses current action versions (v4)
  • Frozen lockfile ensures reproducible builds
  • Browser installation scoped to chromium only (matching config)
  • Screenshot upload with if: always() ensures artifacts are captured even on test failure
  • Reasonable retention period

@vercel vercel bot temporarily deployed to Preview – changes-page-docs November 29, 2025 03:32 Inactive
@vercel vercel bot temporarily deployed to Preview – user-changes-page November 29, 2025 03:32 Inactive
@arjunkomath arjunkomath merged commit f0b05d5 into main Nov 29, 2025
6 of 7 checks passed
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