Skip to content

sweep(deadcode): remove orphaned preview/[prNumber].astro page#225

Open
KooshaPari wants to merge 1 commit into
mainfrom
a30/orphaned-astro-preview-sweep
Open

sweep(deadcode): remove orphaned preview/[prNumber].astro page#225
KooshaPari wants to merge 1 commit into
mainfrom
a30/orphaned-astro-preview-sweep

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Jun 25, 2026

Copy link
Copy Markdown
Owner

User description

Summary

Remove orphaned /preview/[prNumber] Astro microfrontend page that has zero references in the codebase.

Context

The /preview microfrontend was designed to redirect to Vercel preview deploys for open PRs, but it was never wired into site navigation or referenced by any import, link, or route configuration. After a thorough scan of all .astro, .ts, .js, .md, and config files, zero references were found beyond the file itself.

This is part of epic_A hygiene garden & branch slim — removing dead code to reduce build surface and cognitive overhead.

Changes

  • Delete src/pages/preview/[prNumber].astro (283 lines) — Astro page with getStaticPaths, GitHub API integration, and Vercel preview URL resolution
  • Remove the now-empty src/pages/preview/ directory

Testing

# Verify no references were missed
rg -l "preview" --type-add 'code:*.{astro,ts,js,mjs,cjs,json,md}' --type code src/ frontend/ docs/

# Check build is unaffected
cd frontend/web && npm run build

No functional impact — no pages link to /preview/* and no sitemap entry references it.

Links

  • Related issues: N/A (standalone sweep)
  • Part of: epic_A — Hygiene garden & branch slim
  • Area: compute-infra

CodeAnt-AI Description

Remove an unused preview page

What Changed

  • Deleted the orphaned /preview/[prNumber] page that was not linked from anywhere in the app
  • Removed the old preview redirect and fallback 404 content tied to that page

Impact

✅ Fewer unused routes
✅ Smaller deploy surface
✅ Lower risk of stale preview pages

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@KooshaPari KooshaPari added the area:compute-infra Phenotype compute/infra epic label Jun 25, 2026
@codeant-ai

codeant-ai Bot commented Jun 25, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.

@codeant-ai

codeant-ai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@github-actions

Copy link
Copy Markdown

Legacy Tooling Scan Report

Severity Count
Critical 0
High 0
Medium 0
Low 0

No violations detected.

This is a WARN-mode scan. Fix before strict enforcement begins.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request deletes the Astro page component that was responsible for generating static preview redirect pages for open pull requests on GitHub. As there are no review comments to evaluate, I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@sonarqubecloud

Copy link
Copy Markdown

@codeant-ai

codeant-ai Bot commented Jun 25, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 700e9bece1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines -4 to -5
// Tier-3 microfrontend: /preview/<pr#> — redirect to Vercel preview deploy.
// Spec: phenotype-infra/docs/governance/path-microfrontends-tier3.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the canonical preview route

When the landing Astro pages are deployed, this file is the route definition for /preview/<pr#>; deleting it removes the Tier-3 preview microfrontend rather than just an unreferenced import. I checked for a replacement route or redirect and did not find one, so externally shared stable PR-preview URLs now fall through to 404 even though the deleted page documents this path as the canonical redirect surface. If the endpoint is being retired, add an explicit redirect/tombstone or update the governing spec before removing the route.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:compute-infra Phenotype compute/infra epic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant