Skip to content

feat: Q1 2026 P0 features — new tools, enhanced UI, code gen, and test coverage#18

Open
sanmak wants to merge 4 commits intomainfrom
claude/plan-q1-features-W8t5e
Open

feat: Q1 2026 P0 features — new tools, enhanced UI, code gen, and test coverage#18
sanmak wants to merge 4 commits intomainfrom
claude/plan-q1-features-W8t5e

Conversation

@sanmak
Copy link
Owner

@sanmak sanmak commented Feb 25, 2026

New tools:

  • Regex Tester: real-time match highlighting, capture groups, common pattern presets
  • Lorem Ipsum Generator: paragraphs/sentences/words modes with configurable options
  • Subnet Calculator: IPv4/IPv6 with binary visualization and CIDR breakdown

Enhancements:

  • Data Diff Tool: rebuilt UI with side-by-side and inline diff views, format auto-detection
  • Architecture Diagram: promoted from draft to production (removed isDraft flag)
  • Code generation: added 7 new languages (Dart, Elixir, Haskell, Julia, Lua, Perl, Scala)

Quality:

  • Test coverage increased from ~25% to 52%+ (719 tests across 26 files)
  • Added 15 new test files covering formatters, encoders, crypto, generators, text,
    minifiers, converters, validators, comparators, SQL, processors, and workbenches
  • Excluded .claude worktree paths from vitest config

https://claude.ai/code/session_019QTNAzgbA8UV5qUwwaC6bs

…t coverage

New tools:
- Regex Tester: real-time match highlighting, capture groups, common pattern presets
- Lorem Ipsum Generator: paragraphs/sentences/words modes with configurable options
- Subnet Calculator: IPv4/IPv6 with binary visualization and CIDR breakdown

Enhancements:
- Data Diff Tool: rebuilt UI with side-by-side and inline diff views, format auto-detection
- Architecture Diagram: promoted from draft to production (removed isDraft flag)
- Code generation: added 7 new languages (Dart, Elixir, Haskell, Julia, Lua, Perl, Scala)

Quality:
- Test coverage increased from ~25% to 52%+ (719 tests across 26 files)
- Added 15 new test files covering formatters, encoders, crypto, generators, text,
  minifiers, converters, validators, comparators, SQL, processors, and workbenches
- Excluded .claude worktree paths from vitest config

https://claude.ai/code/session_019QTNAzgbA8UV5qUwwaC6bs
Copilot AI review requested due to automatic review settings February 25, 2026 04:15
@codecov-commenter
Copy link

codecov-commenter commented Feb 25, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 98.01325% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/code-gen-utils.ts 96.46% 4 Missing ⚠️
lib/tools/validators/regex-tester.ts 95.58% 3 Missing ⚠️
lib/tools/generators/index.ts 95.00% 1 Missing ⚠️
lib/tools/network/subnet-calculator.ts 99.40% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

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 delivers Q1 2026 P0 tool additions and UX upgrades across the tool registry, API client code generation, and the Data Diff UI, alongside a large set of new unit tests and a Vitest config tweak.

Changes:

  • Added new tools (Regex Tester, Lorem Ipsum Generator, Subnet Calculator) and registered them in the tool registry/router.
  • Rebuilt/enhanced Data Diff UI (auto-detection, sample loading, exports, options UX, and input panels).
  • Expanded API client code generation with 7 additional languages and significantly increased unit test coverage.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vitest.config.ts Excludes .claude/** paths from Vitest runs.
tests/unit/lib/workbenches.test.ts Adds unit tests for OpenAPI/Proto contract workbench routing and linting.
tests/unit/lib/validators.test.ts Adds unit tests for JSON/XML validators.
tests/unit/lib/text.test.ts Adds unit tests for text utilities (case transforms, whitespace removal, etc.).
tests/unit/lib/sql.test.ts Adds unit tests for SQL formatting/linting/explain parsing processors.
tests/unit/lib/shared.test.ts Adds unit tests for shared validation helpers and size-limit constants.
tests/unit/lib/processors.test.ts Adds unit tests for rate-limit backoff processor output/validation paths.
tests/unit/lib/network.test.ts Adds unit tests for DoH response formatting.
tests/unit/lib/minifiers.test.ts Adds unit tests for JSON/CSS/JS/HTML/XML minifiers.
tests/unit/lib/json-diff.test.ts Adds unit tests for JSON structural diff behavior and options.
tests/unit/lib/generators.test.ts Adds unit tests for UUID and epoch/date generators.
tests/unit/lib/formatters.test.ts Adds unit tests for JSON/XML/HTML/CSS formatters (incl. security checks).
tests/unit/lib/encoders.test.ts Adds unit tests for URL/Base64 and escaping/unescaping helpers.
tests/unit/lib/crypto.test.ts Adds unit tests for hashes and JWT decoding.
tests/unit/lib/converters.test.ts Adds unit tests for JSON→CSV conversion.
tests/unit/lib/comparators.test.ts Adds unit tests for diff engine + format detection + dataDiff routing.
lib/tools/validators/regex-tester.ts Implements Regex Tester processing and match extraction logic.
lib/tools/validators/index.ts Exports the new Regex Tester tool entrypoint.
lib/tools/network/subnet-calculator.ts Implements IPv4/IPv6 subnet calculation logic and tool wrapper.
lib/tools/network/index.ts Exports subnet calculator utilities/types from network tools.
lib/tools/generators/lorem-ipsum.ts Implements Lorem Ipsum generation processor and validation.
lib/tools/generators/index.ts Re-exports Lorem Ipsum generator from the generators index.
lib/tool-registry.ts Registers new tools, wires processes, and promotes Architecture Diagram from draft.
lib/code-gen-utils.ts Adds Dart/Elixir/Haskell/Julia/Lua/Perl/Scala code generation targets.
components/api-client/CodeGenerator.tsx Adds the new languages to the Code Generator UI list.
app/tools/subnet-calculator.tsx Adds a dedicated Subnet Calculator UI page.
app/tools/lorem-ipsum.tsx Adds a dedicated Lorem Ipsum Generator UI page.
app/tools/data-diff/page.tsx Enhances Data Diff UX (auto format badge, sample button, exports, shortcuts).
app/tools/data-diff/components/OptionsPanel.tsx Reworks options popover; adds JSON/CSV/text options and active-option badge.
app/tools/data-diff/components/InputPanel.tsx Replaces basic textarea with editor-style panel + line-number gutter.
app/tools/data-diff/components/DiffNavigation.tsx Refines change navigation and export controls in the toolbar.
app/tools/[tool]/page.tsx Adds dynamic routes for new tool pages (regex tester, lorem ipsum, subnet calculator).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 189 to +205
id="csv-key-columns"
placeholder="e.g., id, user_id"
value={options.csvKeyColumns || ''}
onChange={(e) => handleChange('csvKeyColumns', e.target.value)}
value={options.keyColumns ? options.keyColumns.join(', ') : ''}
onChange={(e) => {
const val = e.target.value;
if (val.trim() === '') {
handleChange('keyColumns', [] as string[]);
} else {
handleChange(
'keyColumns',
val
.split(',')
.map((s) => s.trim())
.filter(Boolean),
);
}
}}
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

In the CSV options, clearing the “Primary key columns” field sets keyColumns to an empty array. In csv-diff.ts an empty array is truthy, which switches matching to PRIMARY_KEY and can collapse all rows under the same empty key, producing incorrect diffs. When the input is blank, remove keyColumns (set to undefined/delete) instead of [], and consider only enabling PRIMARY_KEY when keyColumns.length > 0.

Copilot uses AI. Check for mistakes.
…ication

Security:
- Fix incomplete HTML sanitization in lorem-ipsum.tsx (replace /<[^>]*>/g
  with /[<>]/g to prevent HTML injection via partial tag fragments)

Test coverage (147 new tests):
- subnet-calculator: 31 tests (IPv4/IPv6, CIDR ranges, class detection, errors)
- lorem-ipsum: 29 tests (modes, options, edge cases, validation)
- regex-tester: 27 tests (flags, capture groups, invalid patterns, edge cases)
- code-gen-utils: 60 tests (7 new languages with method/header/body coverage)

Code deduplication:
- regex-tester.ts: extract extractMatch() helper (removed ~18 duplicated lines)
- code-gen-utils.ts: merge axios cases and PowerShell cases (~30 lines removed)
- data-diff/page.tsx: extract createFileUploadHandler() and downloadBlob() (~27 lines removed)

https://claude.ai/code/session_019QTNAzgbA8UV5qUwwaC6bs
…, dedup

Copilot review:
- Fix CSV keyColumns empty array bug in OptionsPanel.tsx — set undefined
  instead of [] when clearing, preventing false PRIMARY_KEY matching

Security fixes:
- Reduce regex pattern size limit from 1MB to 10KB (ReDoS mitigation)
- Fix PowerShell body escaping: also escape backticks and $ signs
- Fix IPv6 ULA address type detection: mask 0xc→0xe to exclude ff::/8

Code duplication reduction:
- Extract mapHeaders(), methodHasBody, hasBody, contentType helpers
- Replace 27 Object.entries(activeHeaders).map().join() with mapHeaders()
- Replace 6 ['POST','PUT','PATCH'].includes(method) with methodHasBody
- Net: −128 lines of duplicated patterns in code-gen-utils.ts

Test coverage (+12 tests):
- 8 new IPv6 address type tests (link-local, ULA, multicast, 6to4,
  teredo, global unicast, unspecified, compression edge case)
- 4 new regex-tester tests (zero-length match at end, pattern size
  limit, test string size limit, non-string pattern type check)

https://claude.ai/code/session_019QTNAzgbA8UV5qUwwaC6bs
SonarCloud configuration (sonar-project.properties):
- Exclude test files from CPD (duplication analysis) — test duplication
  is expected and acceptable (repetitive describe/it patterns)
- Configure source/test paths and build artifact exclusions

Code deduplication (generators/index.ts):
- Extract shared generateNameBasedUUID() for UUID v3/v5 (−28 lines)
- Extract withInputValidation() helper for epochToDate/dateToEpoch (−20 lines)

https://claude.ai/code/session_019QTNAzgbA8UV5qUwwaC6bs
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
70 Security Hotspots
9.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

4 participants