Skip to content

UN-4400 [FEAT] Add the v1 code and structured data components: CodeBlock, JsonView, DiffView, Markdown, CopyButton and CodeEditor - #2447

Merged
ritwik-g merged 14 commits into
mainfrom
UN-4400-v1-code-data
Nov 6, 2026
Merged

ritwik-g merged 14 commits into
mainfrom
UN-4400-v1-code-data

Merge remote-tracking branch 'origin/main' into UN-4400-v1-code-data

961ab6c
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Nov 6, 2026 in 39s

Annotations

Check warning on line 49 in frontend/src/v1/components/ui/code/Markdown.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'node' PropType is defined but prop is never used

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrHigwm4EnYWqwAZg9&open=AaGrHigwm4EnYWqwAZg9&pullRequest=2447

Check failure on line 346 in frontend/src/v1/components/ui/code/JsonView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `.dataset` over `getAttribute(…)`.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrOpADtr9ydA2z_NKh&open=AaGrOpADtr9ydA2z_NKh&pullRequest=2447

Check warning on line 606 in frontend/src/v1/components/ui/code/JsonView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrOiS5hhdbsVHtQ&open=AaGrAKrOiS5hhdbsVHtQ&pullRequest=2447

Check warning on line 64 in frontend/src/v1/components/ui/code/JsonView.test.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A presence assertion should use a `getBy*` query so a missing element produces Testing Library diagnostics.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrRiS5hhdbsVHtT&open=AaGrAKrRiS5hhdbsVHtT&pullRequest=2447

Check warning on line 51 in frontend/src/v1/components/ui/code/Markdown.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'depth' PropType is defined but prop is never used

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGwlHRGQE1L4qtJPTDp&open=AaGwlHRGQE1L4qtJPTDp&pullRequest=2447

Check warning on line 140 in frontend/src/v1/lib/code/highlight.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `.at(…)` over `[….length - index]`.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKq9iS5hhdbsVHs5&open=AaGrAKq9iS5hhdbsVHs5&pullRequest=2447

Check warning on line 139 in frontend/src/v1/lib/code/highlight.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `.at(…)` over `[….length - index]`.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKq9iS5hhdbsVHs4&open=AaGrAKq9iS5hhdbsVHs4&pullRequest=2447

Check warning on line 524 in frontend/src/v1/components/ui/code/JsonView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use <details>, <fieldset>, <optgroup>, or <address> instead of the "group" role to ensure accessibility across all devices.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrOiS5hhdbsVHtP&open=AaGrAKrOiS5hhdbsVHtP&pullRequest=2447

Check failure on line 359 in frontend/src/v1/components/ui/code/JsonView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrOiS5hhdbsVHtJ&open=AaGrAKrOiS5hhdbsVHtJ&pullRequest=2447

Check failure on line 124 in frontend/src/v1/lib/code/json-lines.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrHigpm4EnYWqwAZg8&open=AaGrHigpm4EnYWqwAZg8&pullRequest=2447

Check warning on line 35 in frontend/src/v1/components/ui/code/CodeLines.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a stable ID as key, because the index changes when the list changes.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrCiS5hhdbsVHs7&open=AaGrAKrCiS5hhdbsVHs7&pullRequest=2447

Check failure on line 109 in frontend/src/v1/components/ui/code/CodeEditor.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `.dataset` over `getAttribute(…)`.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrIiS5hhdbsVHtE&open=AaGrAKrIiS5hhdbsVHtE&pullRequest=2447

Check warning on line 469 in frontend/src/v1/components/ui/code/JsonView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrOiS5hhdbsVHtO&open=AaGrAKrOiS5hhdbsVHtO&pullRequest=2447

Check warning on line 94 in frontend/src/v1/components/ui/code/CodeBlock.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a stable ID as key, because the index changes when the list changes.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrFiS5hhdbsVHtD&open=AaGrAKrFiS5hhdbsVHtD&pullRequest=2447

Check warning on line 283 in frontend/src/v1/components/ui/code/DiffView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a stable ID as key, because the index changes when the list changes.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrKiS5hhdbsVHtH&open=AaGrAKrKiS5hhdbsVHtH&pullRequest=2447

Check failure on line 419 in frontend/src/v1/components/ui/code/JsonView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrOiS5hhdbsVHtK&open=AaGrAKrOiS5hhdbsVHtK&pullRequest=2447

Check warning on line 434 in frontend/src/v1/components/ui/code/JsonView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrOiS5hhdbsVHtL&open=AaGrAKrOiS5hhdbsVHtL&pullRequest=2447

Check failure on line 208 in frontend/src/v1/components/ui/code/JsonView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 30 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrOiS5hhdbsVHtI&open=AaGrAKrOiS5hhdbsVHtI&pullRequest=2447

Check warning on line 606 in frontend/src/v1/components/ui/code/JsonView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrOiS5hhdbsVHtR&open=AaGrAKrOiS5hhdbsVHtR&pullRequest=2447

Check failure on line 143 in frontend/src/v1/lib/code/diff.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 27 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrHie3m4EnYWqwAZg7&open=AaGrHie3m4EnYWqwAZg7&pullRequest=2447

Check warning on line 74 in frontend/src/v1/components/ui/code/JsonView.test.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A presence assertion should use a `getBy*` query so a missing element produces Testing Library diagnostics.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrRiS5hhdbsVHtU&open=AaGrAKrRiS5hhdbsVHtU&pullRequest=2447

Check warning on line 50 in frontend/src/v1/components/ui/code/Markdown.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'level' PropType is defined but prop is never used

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrHigwm4EnYWqwAZg-&open=AaGrHigwm4EnYWqwAZg-&pullRequest=2447

Check warning on line 261 in frontend/src/v1/components/ui/code/DiffView.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a stable ID as key, because the index changes when the list changes.

See more on https://sonarcloud.io/project/issues?id=Zipstack_unstract&issues=AaGrAKrKiS5hhdbsVHtG&open=AaGrAKrKiS5hhdbsVHtG&pullRequest=2447