Skip to content

good-first: wire settings Field labels with htmlFor and id - #460

Merged
unjica merged 34 commits into
Telemetry-Tracker:developfrom
FelineFantasy:feat/field-htmlFor
Jul 18, 2026
Merged

unjica merged 34 commits into
Telemetry-Tracker:developfrom
FelineFantasy:feat/field-htmlFor

Conversation

@FelineFantasy

Copy link
Copy Markdown
Contributor

Base branch: open feature and fix PRs against develop. Milestone releases promote develop → main — see docs/RELEASE.md.

Summary

#380

How to test

Code review (Bugbot)

  • For notification, alert, billing, ingest, or auth changes: ran /review-bugbot in Cursor before opening this PR (optional but recommended — GitHub Bugbot may skip duplicate review)
  • Addressed or replied to Bugbot findings (resolve thread + update .cursor/BUGBOT.md if a finding was a false positive)

Checklist

  • Tests pass (pnpm test; use RUN_DB_INTEGRATION_TESTS=true + Postgres if API integration behavior changed)
  • Lint passes (pnpm lint)
  • Build succeeds (pnpm build)
  • CHANGELOG.md updated under [Unreleased] (if user-facing)
  • Documentation updated (if needed)
  • New code follows the existing style
  • No breaking changes (or called out clearly above)

Security / privacy

@FelineFantasy
FelineFantasy requested a review from unjica as a code owner July 16, 2026 10:39
@FelineFantasy FelineFantasy changed the title Feat/field html for good-first: wire settings Field labels with htmlFor and id Jul 16, 2026
@FelineFantasy

Copy link
Copy Markdown
Contributor Author

🐱 By the way, I left a small Easter egg in settings-ui.tsx at the end of the file.
Try to find it. It's purr-fectly harmless! 😉

@unjica unjica left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the contribution — and the cat Easter egg made me smile. 😄

Before we merge, could you please remove it from settings-ui.tsx? We’d like to keep shared UI components free of unrelated comments so we can apply the same convention consistently across the codebase.

There’s also the build failure to address (SettingsToggle needs to accept and forward the id prop used by AlertsClient).

Once those are fixed and the build is green, I’ll take another look. Thanks again!

@FelineFantasy

Copy link
Copy Markdown
Contributor Author

Hey @unjica! 👋

Thanks for the review. I've fixed the SettingsToggle onChange handlers across all files and added htmlFor / id associations to the Field component.

The build is now passing. Ready for another look! 🚀

@FelineFantasy

Copy link
Copy Markdown
Contributor Author

I use Arch btw

@unjica unjica left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the follow-up — Easter egg is gone and the build is green. Almost there.

Blocker: In AlertsClient, the toggle fields set htmlFor but never pass a matching id on SettingsToggle:

  • htmlFor="error-spike-toggle" → needs id="error-spike-toggle" on the toggle
  • htmlFor="quota-toggle" → needs id="quota-toggle" on the toggle

SettingsToggle already forwards id via ...rest, so this is just wiring at the call sites. Number inputs (error-threshold, error-window, quota-threshold) look correct.

Without those ids, clicking the Field label does nothing for the toggles, which is the main acceptance criteria for #380.

Nit (non-blocking): The onChange rewrites in Labs / Notifications / Preferences (ignore the boolean and flip from state) aren’t needed for this issue — the previous (v) => … form matched SettingsToggle’s API. Fine to leave if you prefer, but not required for merge.

Once the two toggle ids are in, I’ll approve.

unjica

This comment was marked as duplicate.

@FelineFantasy

Copy link
Copy Markdown
Contributor Author

Hey @unjica! 👋

Thanks for the review. I've added the missing id attributes to SettingsToggle in AlertsClient.tsx:

  • id="error-spike-toggle"
  • id="quota-toggle"

Now clicking the Field labels should toggle the switches correctly. Ready for another look! 🚀

(I am a cat meow meow)

@FelineFantasy

Copy link
Copy Markdown
Contributor Author

Conflicts resolved and branch updated! Ready for another look whenever you have time 🙂

@unjica
unjica self-requested a review July 18, 2026 10:34
@unjica
unjica merged commit 883a405 into Telemetry-Tracker:develop Jul 18, 2026
4 of 5 checks passed
@FelineFantasy
FelineFantasy deleted the feat/field-htmlFor branch July 18, 2026 11:28
FelineFantasy pushed a commit to FelineFantasy/telemetry-tracker that referenced this pull request Jul 20, 2026
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.

2 participants