Skip to content

refactor(vscode): clear the landing-page SonarCloud code smells - #1820

Open
devin-ai-integration[bot] wants to merge 2 commits into
developfrom
fix/sonar-landing
Open

devin-ai-integration[bot] wants to merge 2 commits into
developfrom
fix/sonar-landing

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What and why

Clears the seven SonarCloud code smells on develop in editors/vscode/src/landing/main.ts:

  • typescript:S7755 (1263) — the last trace record is read with steps.at(-1).
  • typescript:S3358 (1264) and typescript:S4624 (1266) — the action status's ending is an if/else if, and the outputs suffix and the token noun are named locals instead of a nested ternary inside nested template literals.
  • typescript:S3358 (1397) — the three-way ternary that ran a scene program is a runProgram switch on program.kind.
  • typescript:S3358 (1407, 1408) and typescript:S4624 (1408) — the status subject (over …) is a runSubject switch on program.kind, with the action's event suffix as its own local.

Both switches cover every SceneProgram kind (journey and rollup share the former fallback branch), so TypeScript checks their exhaustiveness through the return type. Every status string is unchanged. Pure refactor, no changelog fragment.

How it was verified

  • editors/vscode: npm ci, npm run build, npm run typecheck, npm test — 456 pass, 0 fail
  • SonarQube analyze_code_snippet (ts) on develop and this branch reports none of S7755/S3358/S4624 for this file on either side (the analyzer's profile does not reproduce them), so the seven sites were checked by inspection: no .length - 1 index, no nested ternary, no nested template literal remains in the changed functions.

Checklist

  • make test and make lint pass locally (editors/vscode build, typecheck and tests)
  • Tests added or updated for the change (n/a: refactor; existing landing tests cover the status text)
  • Documentation extended where it already covers the surface (n/a)
  • Changelog entry added (n/a: refactor only)
  • baselines regenerated (n/a)
  • No internal work-item labels in the body, docs, or changelog

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/d6cd1346a2844bb0aa32b31cc438fc6b
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/d6cd1346a2844bb0aa32b31cc438fc6b?variant=devin
Requested by: @HuiJun

devin-ai-integration Bot and others added 2 commits November 1, 2026 05:26
Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review November 1, 2026 06:27

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

This branch has not been deployed

No deployments
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