Skip to content

feat(url-encoder): flag repeated query parameters - #401

Merged
anurag629 merged 2 commits into
codercops:developfrom
srikar-naidu:feature/url-repeated-parameter-flags
Oct 28, 2026
Merged

anurag629 merged 2 commits into
codercops:developfrom
srikar-naidu:feature/url-repeated-parameter-flags

Conversation

@srikar-naidu

Copy link
Copy Markdown
Contributor

What and why

Flags every occurrence of repeated query parameter names in the URL Encoder breakdown and summarizes the repeated keys. Detection uses decoded, case-sensitive names while preserving values, empty values, and their original order. A note explains that repeated parameters may be intentional and that applications can interpret them differently.

Closes #399

How I tested this

  • npm run lint — passed with 11 existing warnings
  • npm run test -- --maxWorkers=2 — passed (2,360 tests)
  • npm run build — passed

AI assistance

AI assisted with implementation and validation.

Type of change

  • Bug fix
  • New tool or feature
  • Tests
  • Refactor or cleanup
  • Docs

Checklist

  • I was assigned the linked issue
  • npm run lint && npm run test && npm run build passes locally
  • Logic changes live in lib/ and have a test in lib/__tests__/
  • For a bug fix: the new test fails without my change
  • No analytics, trackers, or calls that send user data off-device
  • Works in both light and dark themes (if UI changed)
  • Inputs have labels and it works with the keyboard alone (if UI changed)
  • New tool: registry entry, page.tsx, client component, opengraph-image.tsx, and the bug report dropdown are all done

Notes for reviewers

No screenshot needed; the change is covered by tests.

@anurag629 anurag629 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @srikar-naidu. Lint (develop's 11 warnings), all 2360 tests, the build and the pages pass on top of develop, and the logic is right: in the built app ?tag=react&tag=typescript&%74ag=x&Tag=a&=one&=two&sort=asc says "2 repeated keys: tag, (empty name)", badges all five, and leaves Tag and sort alone.

One thing: the amber never shows up. The build only has border-[var(--amber)] and bg-[var(--amber)], not the /40, /50 and /10 versions, so in both themes the summary and the badges get the default gray border and no tint (computed border rgb(229, 231, 235), transparent background). The issue asks for text as well as color, so use classes that exist, like border-[var(--amber)] with text-[var(--amber)] on the badge, or set the tint with color-mix() in a style.

@anurag629 anurag629 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @srikar-naidu, that fixed it. Lint (develop's 11 warnings), all 2360 tests, the build and the pages pass on top of develop, and in the built app the summary and the badges now come out amber in both themes (border and text #b5700a in light, #ffb547 in dark), with the same five badges and the same summary as before.

@anurag629 anurag629 added the hacktoberfest-accepted PR counts for Hacktoberfest label Oct 28, 2026
@anurag629
anurag629 merged commit 4c837b4 into codercops:develop Oct 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PR counts for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

URL Encoder: flag repeated query parameters in the parameter breakdown

2 participants