Skip to content

Fix latent prefer-array-find lint error breaking verify on every PR - #7523

Merged
brennanb2025 merged 1 commit into
mainfrom
fix-prefer-array-find-linear-media
Jul 6, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
fix-prefer-array-find-linear-media

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every open PR currently fails the verify check at the Lint step. Two recent main commits crossed: 7b7a21e3c (Linear inline media) added a .filter(Boolean).pop() in src/shared/linear-inline-media.ts, and ce687221d enabled unicorn/prefer-array-find, which flags that pattern. Each PR passed its own checks against the base it was tested on, but their merge is red — and since verify only runs on PRs (not on main pushes), the breakage is invisible on main and surfaces as a lint failure on every PR's merge commit.

One-line fix: .split('/').filter(Boolean).pop() → .split('/').findLast(Boolean) — identical semantics (last non-empty path segment), satisfies the rule.

Testing

  • pnpm exec oxlint — 0 errors (was 1)
  • pnpm vitest run src/shared/linear-inline-media.test.ts — 2 passed

Found while investigating the verify failure on #7460, whose own files are lint-clean.

Made with Orca 🐋

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ce31817d-3a8b-4079-9863-5f0610e741c3

📥 Commits

Reviewing files that changed from the base of the PR and between 3dd3cc9 and 7c65dce.

📒 Files selected for processing (1)
  • src/shared/linear-inline-media.ts

📝 Walkthrough

Walkthrough

The change modifies the fileNameFromUrl() function in src/shared/linear-inline-media.ts. The method for selecting the last non-empty pathname segment is changed from filter(Boolean).pop() to findLast(Boolean). The rest of the parsing and decoding logic remains unchanged. No exported or public entity declarations are altered.

Changes

Cohort / File Summary
src/shared/linear-inline-media.ts Replaced filter(Boolean).pop() with findLast(Boolean) for selecting the last truthy pathname segment in fileNameFromUrl().

Sequence Diagram(s)

Not applicable; this is a single-line logic substitution with no observable flow change.

Estimated code review effort: 1 (Trivial)

Related issues: None specified.

Related PRs: None specified.

Suggested labels: none

Suggested reviewers: none

🐰 A hop, a tweak, one line refined,
findLast now seeks the truth behind,
no more filter, no more pop,
a tidier path segment's crop.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and testing, but it omits screenshots, AI review, security audit, notes, and the required cross-platform review details. Add the missing template sections: Screenshots or "No visual change", full Testing checklist, AI Review Report with macOS/Linux/Windows checks, Security Audit, and Notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: replacing a lint-flagged array pattern to fix PR verify failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@brennanb2025
brennanb2025 merged commit 39c7bef into main Jul 6, 2026
2 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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