Skip to content

fix(website): satisfy lint in the landing fit script - #433

Merged
Waishnav merged 1 commit into
mainfrom
fix/landing-lint
Oct 30, 2026
Merged

Waishnav merged 1 commit into
mainfrom
fix/landing-lint

Conversation

@Waishnav

@Waishnav Waishnav commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

CI on main has failed lint since 3af79b9: the landing page's fit script casts firstElementChild without a SAFETY: justification and is missing the blank lines the anti-slop rules require.

This replaces the cast with an instanceof HTMLElement guard, which is the real invariant (every [data-fit] wrapper has one element child), and adds the blank lines. Behavior is unchanged. pnpm lint now passes.

The packaging and installer PRs stack on this so their CI runs aren't red for an unrelated reason.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of content that cannot be measured for fitting, helping prevent issues during page layout and resizing.
    • Existing scaling behavior remains unchanged.

Replace the unchecked firstElementChild cast with an instanceof guard and
add the blank lines lint requires. Behavior is unchanged; this unblocks
CI on main, which has failed lint since 3af79b9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 221586c 2026-10-30T05:40:28.267Z Visit the dashboard ↗

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f4ba33d-a41d-4384-a7d1-32b704e00a2e
Commits

Reviewing files that changed from the base of the PR and between 221586c and 221586c.

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fa2c8226-0bcc-439a-8c58-1260e7ac66f8
Commits

Reviewing files that changed from the base of the PR and between 3af79b9 and 221586c.

Files selected for processing: 1
  • website/landing/home/Landing.astro

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The landing page’s [data-fit] handler now checks that its first child is an HTMLElement. If it is not, the handler skips that iteration. Scaling and resize-observer behavior remain unchanged.

Changes: Landing profile-card fitting

Layer / File(s) Summary
Guard the fit handler
website/landing/home/Landing.astro
The [data-fit] handler exits when its first child is not an HTMLElement. Existing scaling and height updates remain unchanged.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Refactor

Possibly related PRs

Merge Risk: Minimal · up to 22158

The fit-handler guard introduces no identified merge-blocking risk. Merge after normal checks pass.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the website landing fit script and the lint-related fix, which matches the main change.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the first child’s kind,
Then leaves the scaling flow aligned.
The card still fits as before,
With no unchecked cast at the door.
A neat guard keeps the page in line.

Comment @coderabbitai help to get the list of available commands.

@Waishnav
Waishnav added this pull request to stack #437 October 30, 2026 06:22
@Waishnav
Waishnav removed this pull request from stack #437 October 30, 2026 06:25
@Waishnav
Waishnav added this pull request to stack #438 October 30, 2026 06:25
@Waishnav
Waishnav removed this pull request from stack #438 October 30, 2026 06:30
@Waishnav
Waishnav merged commit f79016a into main Oct 30, 2026
5 checks passed
@Waishnav
Waishnav deleted the fix/landing-lint branch October 30, 2026 06:32
@Waishnav
Waishnav restored the fix/landing-lint branch October 30, 2026 06:32
@Waishnav
Waishnav deleted the fix/landing-lint branch October 30, 2026 06:33
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.

1 participant