Skip to content

fix(quality): resolve all 28 repo-level Codacy issues (ESLint8 suppressions + 9 code fixes) - #628

Merged
d-oit merged 14 commits into
mainfrom
fix/codacy-repo-issues-2026-08-10
Aug 10, 2026
Merged

fix(quality): resolve all 28 repo-level Codacy issues (ESLint8 suppressions + 9 code fixes)#628
d-oit merged 14 commits into
mainfrom
fix/codacy-repo-issues-2026-08-10

Conversation

@d-oit

@d-oit d-oit commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

Resolves all 28 repo-level Codacy issues on main (23 High, 3 Error, 2 Warning) via a mix of real code fixes and false-positive suppressions.

Root cause

.codacy.yml disables ESLint9_-prefixed rules, but Codacy's cloud analysis actually runs the legacy ESLint (v8) engine, which reports ESLint8_-prefixed pattern IDs — so every suppression was silently ineffective. Added an eslint-8 engine section with matching ESLint8_ suppressions for verified false-positive patterns.

Real code fixes (9)

File Fix
triz-view.tsx Clipboard promise: void ... .catch() + try/catch (no-floating-promises, no-unnecessary-condition)
type-selector.tsx Removed unnecessary ?. on in-bounds NodeList index
command-palette.tsx `
shared-primitives.tsx [0].at(0) so ?? container fallback is type-honest
form.tsx Removed dead if (!fieldContext) guard (never null; dereferenced above)
use-mobile.ts Braces around void-returning arrow cleanup
encrypt-export-dialog.tsx void handleExport(...) (no-misused-promises)
export-format-grid.tsx Braces around void setter (no-confusing-void-expression)
self-fix-loop.sh SC2015: `A && B

False positives suppressed (19)

  • 3× SSRF (Semgrep) — all fetches guarded by validateOllamaUrl (localhost-only) / protocol + isPrivateIP checks; added inline // nosemgrep markers with justification
  • xss/no-mixed-html — React JSX components, DOM-node refs, and file downloads (not raw HTML strings executed in DOM)
  • security/detect-object-injection — indexing constant lookup tables (TRIZ_PARAMETERS, BUTTON_VARIANTS) with typed keys
  • no-unnecessary-condition — runtime-defensive optional chaining where the type system is non-nullable

Validation

  • tsc -p tsconfig.app.json --noEmit
  • ESLint on all changed files ✓
  • 95 tests across 8 affected suites ✓
  • shellcheck on self-fix-loop.sh

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
do-knowledge-studio Ready Ready Preview, v0 Aug 10, 2026 3:27pm

@deepsource-io

deepsource-io Bot commented Aug 10, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 63558b9...98aaea4 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Aug 10, 2026 3:32p.m. Review ↗
Python Aug 10, 2026 3:32p.m. Review ↗
Shell Aug 10, 2026 3:32p.m. Review ↗
SQL Aug 10, 2026 3:32p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Comment thread src/components/studio/views/encrypt-export-dialog.tsx Outdated
Comment thread src/components/studio/views/triz-view.tsx Outdated
@codacy-production

codacy-production Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 51 complexity · 1 duplication

Metric Results
Complexity 51
Duplication 1

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@owl-watch owl-watch 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.

🦉 OwlWatch reviewed this change — 2 new finding(s).

Additional findings:

  • [HIGH · tracker] Potential out-of-bounds array access in keyboard navigation (src/components/studio/views/type-selector.tsx:96)

Comment thread scripts/self-fix-loop.sh Outdated

@owl-watch owl-watch 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.

🦉 OwlWatch reviewed this change — 1 new finding(s).

Comment thread src/components/studio/views/triz-view.tsx
@github-actions github-actions Bot added the documentation Documentation improvements label Aug 10, 2026

@owl-watch owl-watch 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.

🦉 OwlWatch reviewed this change — 1 new finding(s).

Comment thread src/components/ui/form.tsx

@owl-watch owl-watch 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.

🦉 OwlWatch reviewed this change — 1 new finding(s).

Comment thread src/components/studio/views/type-selector.tsx
Convert the five JS-0067-flagged export function declarations (TrizView,
TypeSelector, CommandPalette, useIsMobile, Overlay) to const arrow
functions, the AGENTS.md-preferred form, and drop the void operator from
the two JS-0098-flagged promise call sites (clipboard write, encrypted
export) in favor of .catch(() => undefined), which satisfies Codacy's
no-floating-promises rule without the void keyword.

DeepSource reported issuesSuppressedCount: 0 for these codes despite the
issue_patterns in .deepsource.toml, so the code fix is the primary remedy.
Comment thread src/components/studio/ui/shared-primitives.tsx Outdated
Comment thread src/components/studio/views/triz-view.tsx
Comment thread src/components/studio/views/triz-subviews.tsx
Comment thread src/components/studio/views/triz-subviews.tsx
Comment thread src/components/studio/views/triz-subviews.tsx Outdated
Comment thread src/components/studio/views/triz-subviews.tsx Outdated
Comment thread src/components/studio/views/triz-subviews.tsx Outdated
Comment thread src/components/studio/views/triz-subviews.tsx Outdated
Comment thread src/components/studio/views/triz-view.tsx

@owl-watch owl-watch 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.

🦉 OwlWatch reviewed this change — 1 new finding(s).

Comment thread src/components/studio/views/triz-subviews.tsx Outdated

@owl-watch owl-watch 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.

🦉 OwlWatch reviewed this change — 3 new finding(s).

Comment thread src/components/studio/views/triz-matrix-view.tsx Outdated
Comment thread src/components/studio/views/triz-results-view.tsx
Comment thread src/components/studio/views/triz-matrix-view.tsx
Comment thread src/components/studio/ui/overlay.tsx
Comment thread src/components/studio/ui/overlay.tsx
Comment thread src/components/studio/ui/overlay.tsx
Comment thread src/components/studio/ui/overlay.tsx
Comment thread src/components/studio/ui/overlay.tsx
Comment thread src/components/studio/views/triz-results-view.tsx
Comment thread src/components/studio/ui/overlay.tsx

@owl-watch owl-watch 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.

🦉 OwlWatch reviewed this change — 1 new finding(s).

Comment thread src/components/studio/views/triz-matrix-view.tsx

@owl-watch owl-watch 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.

🦉 OwlWatch reviewed this change — 1 new finding(s).

Comment thread src/components/studio/views/triz-matrix-view.tsx
@github-actions github-actions Bot added the tests Related to automated/manual tests label Aug 10, 2026
@d-oit
d-oit enabled auto-merge (squash) August 10, 2026 15:31
@d-oit

d-oit commented Aug 10, 2026

Copy link
Copy Markdown
Owner Author

ci: re-evaluate mergeability after review-thread resolution (Plan 098) — reopen immediately

@d-oit d-oit closed this Aug 10, 2026
auto-merge was automatically disabled August 10, 2026 15:32

Pull request was closed

@d-oit d-oit reopened this Aug 10, 2026
@d-oit
d-oit enabled auto-merge (squash) August 10, 2026 15:33
@d-oit
d-oit merged commit bc53bd9 into main Aug 10, 2026
45 checks passed
@d-oit
d-oit deleted the fix/codacy-repo-issues-2026-08-10 branch August 10, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config documentation Documentation improvements scripts tests Related to automated/manual tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant