Skip to content

feat: implement issue #428 — SonarCloud: JavaScript/TypeScript code quality - #467

Merged
don-petry merged 5 commits into
mainfrom
dev-lead/issue-428-20260721-1926
Aug 2, 2026
Merged

feat: implement issue #428 — SonarCloud: JavaScript/TypeScript code quality#467
don-petry merged 5 commits into
mainfrom
dev-lead/issue-428-20260721-1926

Conversation

@don-petry

@don-petry don-petry commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

User description

Closes #428

Implemented by dev-lead agent. Please review.


CodeAnt-AI Description

Improve generated email content and make deployment and calendar workflows more reliable

What Changed

  • Generated documents now remove Outlook-style reply headers and quoted content more consistently.
  • Deployment errors include clearer API details, while invalid file content is reported as a specific input error.
  • Calendar synchronization avoids unintended row deletions outside the selected time range.
  • File naming conflicts are handled consistently for files with common extensions.
  • Scheduling, coverage, and deployment tests now validate timing and results without fixed delays.

Impact

✅ Cleaner generated email documents
✅ Clearer deployment failure messages
✅ Fewer accidental calendar row deletions
✅ More reliable deployment and scheduling checks

💡 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.

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of malformed data, missing values, email reply headers, file types, and attachment names.
    • Strengthened validation for dates, schedules, request responses, and project content.
    • Preserved deployment and processing behavior while improving compatibility with modern JavaScript environments.
  • Tests

    • Made interface tests wait for actual lookup completion, improving reliability.
    • Expanded email cleanup coverage for common Outlook reply formats.
    • Consolidated scheduling tests for clearer coverage of valid and invalid timing scenarios.

Copilot AI review requested due to automatic review settings July 21, 2026 19:50
@don-petry
don-petry requested a review from a team as a code owner July 21, 2026 19:50
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 05d6fb1b-1442-465b-91e1-bcbf601a663f

📥 Commits

Reviewing files that changed from the base of the PR and between 3d678e9 and 4dd27d0.

📒 Files selected for processing (5)
  • deploy/index.html
  • deploy/tests/ui.spec.js
  • src/calendar-to-sheets/src/index.js
  • src/gas-utils.js
  • src/gmail-to-drive-by-labels/tests/gas-utils.test.js
📝 Walkthrough

Walkthrough

The PR applies SonarCloud-driven JavaScript modernization across deployment UI, installers, application modules, coverage tooling, and test utilities. It updates syntax, validation, parsing, escaping, iteration, error types, and asynchronous test synchronization without changing intended behavior.

Changes

Code quality modernization

Layer / File(s) Summary
Deployment UI and installer updates
deploy/index.html, deploy/tests/ui.spec.js, gas-installer/Index.html, gas-installer/src/index.js
Deployment and installer code use modern parsing, escaping, header merging, optional chaining, and filename checks. The UI test waits for the Drive response instead of using a fixed delay.
Mail parsing and attachment handling
src/gas-utils.js, src/gmail-to-drive-by-labels/src/index.js, src/gmail-to-drive-by-labels/tests/gas-utils.test.js
Reply-header matching, subject fallback, and attachment extension matching are updated. Tests cover Outlook-style reply headers and structured email addresses.
Calendar, sheets, and deployment validation
src/calendar-to-briefing-doc/src/index.js, src/calendar-to-sheets/src/index.js, src/deploy/index.js, src/calendar-to-briefing-doc/tests/index.test.js
Calendar and sheet checks use optional chaining, explicit date validation, and non-mutating sorting. Invalid deployment sources now raise TypeError. Weekly scheduling tests use one parameterized test.
Coverage and test utility updates
scripts/check-coverage.js, test-utils/mocks.js, test-utils/setup.js
Coverage counting uses direct iteration. Node imports use node: specifiers. Test mocks use optional chaining and default calendar names.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: donpetry-bot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 56.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the implementation of issue #428 and the repository-wide SonarCloud JavaScript/TypeScript quality work.
Linked Issues check ✅ Passed The changes address the linked SonarCloud findings with targeted fixes and tests, while reported CI and SonarCloud checks passed.
Out of Scope Changes check ✅ Passed The code and test changes remain within the linked issue scope of resolving SonarCloud JavaScript/TypeScript quality findings.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-428-20260721-1926

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.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Issue #428 by applying SonarCloud-driven JavaScript/TypeScript code quality fixes across the repository, aiming to reduce findings to zero while preserving existing behavior and keeping CI green.

Changes:

  • Modernized JS patterns to satisfy SonarCloud rules (optional chaining, replaceAll, Number.parseInt, node: core imports, Date.now, TypeError for type checks).
  • Simplified/optimized regexes and removed minor code smells (unused variable, nested ternary) without changing functional intent.
  • Updated/added tests to cover reply-header parsing and improved e2e test synchronization (avoid fixed sleeps).

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test-utils/setup.js Switches to node:crypto core import for Node 20+ consistency.
test-utils/mocks.js Uses optional chaining and adjusts default params to align with Sonar guidance.
src/gmail-to-drive-by-labels/tests/gas-utils.test.js Adds coverage for additional reply-header cutoff cases.
src/gmail-to-drive-by-labels/tests/code.test.js Improves time-mocking to use Date.now() in addition to getTime().
src/gmail-to-drive-by-labels/src/index.js Minor refactors (`
src/gas-utils.js Uses node:crypto, refines regex patterns, and simplifies newline indexing logic.
src/deploy/index.js Uses TypeError for invalid type checks as flagged by Sonar.
src/calendar-to-sheets/src/index.js Optional chaining / NaN checks and uses toSorted() per rule guidance.
src/calendar-to-briefing-doc/tests/index.test.js Consolidates repetitive schedule tests via it.each.
src/calendar-to-briefing-doc/src/index.js Optional chaining simplifications for null-safe collection checks.
scripts/check-coverage.js Uses node: imports and simplifies branch hit iteration with for...of.
gas-installer/src/index.js Uses endsWith and optional chaining for clearer filtering/type checks.
gas-installer/Index.html Replaces chained replace calls with replaceAll in HTML escaping helper.
deploy/tests/ui.spec.js Replaces fixed timeout with response-based synchronization for stability.
deploy/index.html Removes unused variable, simplifies regex/ternary, modernizes parsing/escaping, and improves fetch error handling diagnostics.

@don-petry
don-petry disabled auto-merge July 21, 2026 20:07
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead Fix CI — failed

PR: #467 | SHA: 8c3e89887c2440b2c31436e97bd23f538518fb6b
Engine invocation failed (exit 1)

@codeant-ai

codeant-ai Bot commented Aug 2, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Incremental review completed 3d678e9 Aug 02, 2026 · 11:24 11:25
✅ Reviewed your PR 2542957 Aug 02, 2026 · 02:03 02:06

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Aug 2, 2026
@don-petry
don-petry disabled auto-merge August 2, 2026 02:04
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) August 2, 2026 02:04
@don-petry
don-petry disabled auto-merge August 2, 2026 02:05
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
- No actionable issues — Quality Gate passed with 0 new issues and 0 security hotspots
Files changed: None
Skipped (informational): 0
```
The PR is in excellent shape. All automated analysis tools report success, and there are no code quality, security, or test coverage issues to address. The branch is ready for merge.

@don-petry
don-petry enabled auto-merge (squash) August 2, 2026 02:05
Comment thread src/calendar-to-sheets/src/index.js Outdated
Comment thread deploy/index.html Outdated
Comment thread src/gas-utils.js Outdated
@donpetry-bot

donpetry-bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at 2542957ba9f8d84a6d4b9ff29c0f083ac67db620 — click to expand prior review.

Review — fix requested (cycle 1/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 2542957ba9f8d84a6d4b9ff29c0f083ac67db620
Review mode: triage-approved (single reviewer)

Summary

Mechanical SonarCloud lint cleanup (56 findings) across 15 files: optional chaining, replaceAll, Number.parseInt, node: import prefixes, regex simplification, nested-ternary extraction, parameterized tests. SonarCloud Quality Gate passed with 0 new issues and all substantive CI checks are green. However, 3 codeant-ai review threads posted at 02:06 UTC (after the dev-lead's last fix-bot-comment pass at 02:05:40) remain unresolved, so the no-unresolved-threads gate blocks auto-approval.

Linked issue analysis

Closes #428 (SonarCloud: JavaScript/TypeScript code quality, 56 findings, priority:major). The diff maps directly to the issue's rule buckets (S6582 optional chains, S7781 replaceAll, S7773 Number.parseInt, S7772 node: prefix, S8786 regex performance, S3358 nested ternaries, S5976 parameterized tests, etc.). Acceptance criteria substantively met: SonarCloud Quality Gate passed on the PR with 0 new issues, no NOSONAR suppressions used, and no intended behavior change observed in the diff.

Findings

Unresolved review threads (blocking gate #4) — 3 codeant-ai threads, none triaged:

  1. src/calendar-to-sheets/src/index.js — toSorted runtime concern: NOT an issue. Verified: production GAS code is the separate code.gs wrapper, which still uses toDelete.sort() (line 271, unchanged). The src/index.js port runs only under Node/Jest in CI, where Node.js Tests passed. Safe to resolve with this rationale.
  2. deploy/index.html — falsy-zero Number.parseInt(fields.triggerHour, 10) || 7: real but PRE-EXISTING bug. Selecting 12 AM (hour 0) falls back to 7 AM. This PR only renamed parseIntNumber.parseInt; the || 7 fallback predates it. Out of scope for a no-behavior-change lint PR — recommend resolving the thread and filing a follow-up issue (fix: Number.isNaN check instead of truthiness).
  3. src/gas-utils.js — From: reply-header truncation: pre-existing design tradeoff. The regex tightening ([^<]+<[^@]+@[^>]+>) addresses S8786 super-linear performance; note the new [^<]+ class can span newlines where the old .+ could not, slightly broadening the match. New tests cover the intended cases. Low risk; acceptable to resolve, optionally anchor with a non-newline class if strict equivalence is desired.

Other observations (non-blocking): the Date mock in code.test.js correctly adds static now() to match the production switch to Date.now(); escapeHtml replaceAll ordering (& first) is preserved; /(\.[\w-]+)$/ is equivalent to /(\.[\w\d_-]+)$/. No security-relevant changes; gitleaks and CodeQL green. Secret-scanning MCP tool not available in this run — gitleaks CI check (SUCCESS) covers secret detection.

Requested action: triage/resolve the 3 codeant-ai threads per the analysis above (no code changes strictly required; item 2 warrants a follow-up issue), then re-request review.

CI status

All substantive checks green: build-and-test ✓, Node.js Tests ✓, Playwright UI Tests ✓, coverage ✓, SonarCloud ✓ (Quality Gate passed, 0 new issues), CodeQL ✓ (actions/js-ts/python), gitleaks ✓, agent-shield ✓, npm audit ✓, autofix ✓. Pending/queued entries are the pr-auto-review and dev-lead orchestration checks themselves.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

@donpetry-bot

donpetry-bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at 4dd27d05b301d77755a16d5a1e19f8d035aaaa15 — click to expand prior review.

Review — fix requested (cycle 2/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 2542957ba9f8d84a6d4b9ff29c0f083ac67db620
Review mode: triage-approved (single reviewer)

Summary

Mechanical SonarCloud lint cleanup (56 findings) across 15 files: optional chaining, replaceAll, Number.parseInt, node: import prefixes, regex simplification, nested-ternary extraction, parameterized tests. Triage's low-risk read is confirmed correct and all substantive CI is green (SonarCloud Quality Gate passed, 0 new issues). Blocked only by gate #4: the 3 codeant-ai review threads flagged in review cycle 1 are still unresolved at the same commit — no new commits and no thread triage since the prior fix request.

Linked issue analysis

Closes #428 (SonarCloud JS/TS code quality, 56 findings, priority:major). The diff maps directly to the issue's rule buckets (S6582 optional chains, S7781 replaceAll, S7773 Number.parseInt, S7772 node: prefix, S8786 regex performance, S3358 nested ternaries, S5976 parameterized tests, etc.). Acceptance criteria substantively met: Quality Gate passed with 0 new issues, no NOSONAR suppressions, no intended behavior change.

Findings

Unresolved review threads (blocking gate #4) — 3 codeant-ai threads, unchanged since the cycle-1 fix request at this same SHA (2542957). Carried forward with analysis:

  1. src/calendar-to-sheets/src/index.js — toSorted runtime concern: NOT an issue (independently re-verified this cycle). The deployed GAS wrapper code.gs line 271 still uses toDelete.sort(); the toSorted call is in the Node/Jest-only port, and Node.js Tests passed in CI. Safe to resolve with this rationale.
  2. deploy/index.html — falsy-zero Number.parseInt(fields.triggerHour, 10) || 7: real but PRE-EXISTING bug. Selecting 12 AM (hour 0) saves 7 AM. This PR only renamed parseIntNumber.parseInt; the || 7 fallback predates it. Out of scope for a no-behavior-change lint PR — resolve the thread and file a follow-up issue (fix: NaN-specific fallback).
  3. src/gas-utils.js — From: reply-header truncation: pre-existing design tradeoff. The regex tightening addresses S8786; new tests cover the intended cases. Low risk; acceptable to resolve as-is.

No new issues found this cycle. No code changes are required — the outstanding action is thread triage: resolve the 3 codeant-ai threads per the analysis above (item 2 warrants a follow-up issue). Cycle 1 requested exactly this and the dev-lead responded no-changes without resolving the threads; since threads must be resolved by a maintainer, this now needs human (or delegated-AI) thread triage rather than another code pass.

Secret scan: secret-scanning MCP tool not available in this run — noted per protocol; gitleaks CI check (SUCCESS) covers secret detection, and no credential-like content appears in the diff.

CI status

All substantive checks green: build-and-test ✓, Node.js Tests ✓, Playwright UI Tests ✓, coverage ✓, SonarCloud ✓ (Quality Gate passed, 0 new issues), CodeQL ✓ (actions/js-ts/python), gitleaks ✓, agent-shield ✓, npm audit ✓, autofix ✓. CANCELLED/SKIPPED entries are dev-lead/review orchestration stubs, not test failures.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed.

…260721-1926

# Conflicts:
#	deploy/index.html
#	src/calendar-to-briefing-doc/src/index.js
#	src/calendar-to-sheets/src/index.js
#	src/gmail-to-drive-by-labels/src/index.js
#	src/gmail-to-drive-by-labels/tests/code.test.js
@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:L This PR changes 100-499 lines, ignoring generated files labels Aug 2, 2026
@don-petry
don-petry disabled auto-merge August 2, 2026 11:25
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) August 2, 2026 11:29

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@deploy/index.html`:
- Line 1567: Update the trigger-hour parsing at the hour assignment to preserve
a parsed value of 0; parse fields.triggerHour once, then use the default 7 only
when the field is absent or parsing produces NaN.

In `@deploy/tests/ui.spec.js`:
- Around line 275-281: Update the driveLookup waitForResponse predicate to
require both the Drive files URL match and resp.ok() before continuing. Keep the
existing signIn and await driveLookup flow unchanged so the hidden-card
assertion only runs after a successful lookup.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 77449df5-abb7-48e1-a9b3-81c11782fac5

📥 Commits

Reviewing files that changed from the base of the PR and between e44d9ef and 3d678e9.

📒 Files selected for processing (14)
  • deploy/index.html
  • deploy/tests/ui.spec.js
  • gas-installer/Index.html
  • gas-installer/src/index.js
  • scripts/check-coverage.js
  • src/calendar-to-briefing-doc/src/index.js
  • src/calendar-to-briefing-doc/tests/index.test.js
  • src/calendar-to-sheets/src/index.js
  • src/deploy/index.js
  • src/gas-utils.js
  • src/gmail-to-drive-by-labels/src/index.js
  • src/gmail-to-drive-by-labels/tests/gas-utils.test.js
  • test-utils/mocks.js
  • test-utils/setup.js

Comment thread deploy/index.html Outdated
Comment thread deploy/tests/ui.spec.js
@don-petry
don-petry disabled auto-merge August 2, 2026 11:29
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) August 2, 2026 11:30
@don-petry
don-petry disabled auto-merge August 2, 2026 11:31
@sonarqubecloud

sonarqubecloud Bot commented Aug 2, 2026

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) August 2, 2026 11:32

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 4dd27d05b301d77755a16d5a1e19f8d035aaaa15
Review mode: triage-approved (single reviewer)

Summary

Code-quality cleanup addressing SonarCloud issue #428: mechanical refactors (optional chaining, replaceAll, Number.parseInt, node: import prefixes, regex simplifications) across 14 files (+84/−81), plus small test-covered correctness fixes surfaced during review (midnight-hour falsy-zero bug, over-broad reply-header regex, non-mutating row-delete sort, deflaked Playwright wait). All prior review threads resolved and all CI checks green.

Linked issue analysis

Issue #428 reports 56 open SonarCloud findings (worst severity MAJOR) with a rule-by-rule table. The diff maps directly onto the listed rules: S6582 (optional chains), S7781 (replaceAll), S7773 (Number.parseInt), S7772 (node: prefixes), S5869 (duplicate character-class entries, e.g. [\w\d_-] → [\w-]), S3358 (nested ternary extracted to if/else). The SonarCloud and SonarCloud Code Analysis checks pass on this head SHA, confirming the findings are substantively addressed. Issue is substantively addressed.

Findings

No blocking findings.

  • Verified the removed unused safeId declaration in deploy/index.html (~line 651) has no remaining references in that scope; the other safeId usages (lines 1059–1081) are a separate function with its own declaration.
  • Prior bot findings were all fixed and their threads resolved: Node <20 toSorted.slice().sort(); || 7 falsy-zero midnight bug → explicit Number.isNaN check; over-broad From: reply-header pattern removed with regression tests added; Playwright fixed-timeout replaced by waitForResponse with resp.ok() (confirmed by CodeRabbit).
  • Behavioral equivalence spot-checks: &#39; vs &#x27; HTML entity (equivalent), {...options.headers} with undefined spread (safe no-op), Number.isNaN(dateA.getTime()) vs isNaN(dateA) (equivalent).
  • MCP secret-scanning tool unavailable in this run; gitleaks CI check passed (no secrets in diff by inspection either).

CI status

All required checks green: build-and-test, Node.js Tests, Playwright UI Tests, coverage, CodeQL (actions/js-ts/python), SonarCloud, Secret scan (gitleaks), AgentShield, dependency-audit (npm), autofix, CodeRabbit, Graphite. Skipped jobs are ecosystem-conditional (pnpm/go/cargo/pip, dependabot).


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@don-petry
don-petry merged commit 18f442c into main Aug 2, 2026
27 checks passed
@don-petry
don-petry deleted the dev-lead/issue-428-20260721-1926 branch August 2, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SonarCloud: JavaScript/TypeScript code quality

4 participants