fix: resolve SonarQube accessibility issues across web app - #2
Merged
Conversation
- S6848/S6847: Replace non-interactive divs with buttons for celebrations
(all-done, goal-completed, streak, streak-freeze, welcome-back-toast)
- S6848: Add role="presentation" to backdrop overlays (app-overlay,
notification-bell, app-date-picker)
- S6848: Add role="button" to habit-card article with click handlers
- S6848: Add role="menu" to action menu portal divs (habit-card, page.tsx)
- S6848: Restructure checklist-templates into proper button elements
- S6848: Add role/tabIndex/onKeyDown to ai-settings fact items in select mode
- S6811: Add role="checkbox" to habit-card selection button with aria-checked
- S6852: Add tabIndex={0} to tablist container for focusability
- S6848: Remove onClick from breakdown-suggestion checkbox visual div
(label already handles toggle), add aria-hidden
- S6848: Add role="group" to goal-list draggable containers
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
thomasluizon
added a commit
that referenced
this pull request
Apr 15, 2026
…ferral/JWT
Security hardening on the web BFF auth layer:
- Dedicated /api/auth/{send-code,verify-code,google,logout} routes now call
buildForwardedClientHeaders(request) so X-Forwarded-For / CF-Connecting-IP /
X-Orbit-Country-Code / Accept-Language / X-Orbit-Time-Zone reach the .NET
backend. Previously these routes sent no client context, so the backend's
DistributedRateLimitFilter partitioned every anonymous auth request under
the Next.js server IP — collapsing the per-client 5 req/min bucket.
- auth_token cookie maxAge changed from 86_400 (1 day) to 604_800 (7 days) so
it matches the backend JwtSettings.ExpiryHours=168. Prevents daily forced
token refresh round-trips.
- Length-cap the JWT payload segment in /api/auth/session before JSON.parse
(4 KB ceiling). Blocks a memory-amplification vector where a malicious
cookie contains a megabyte-scale base64 segment.
- Cap referral query-param at 40 chars before cookie write on the login page.
Includes new unit tests for send-code header forwarding and updates
auth-api.test.ts to assert the 7-day maxAge.
Covers frontend plan Area A #1, #2, #4, #5.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Apr 15, 2026
…lidators Covers the P1 missing-validation findings in the audit: - validateGoalDeadline(deadline, today): blocks past dates, rejects garbage strings (goals.form.deadlinePast / goals.form.deadlineInvalid i18n keys). - validateReminderTimes(minutes): enforces the backend contract that minutes-before-due offsets are integers in [0, 1440] and unique. - validateDueTimes(dueTime, dueEndTime): blocks the case where a user sets only the end time without a start time. validateReminderSelection and validateHabitForm now delegate into the new validators so inline errors fire on the existing form flows without touching each component. Adds en/pt-BR i18n keys with proper diacritics on the Portuguese strings. Extends validation.test.ts and goal-form.test.ts with exhaustive boundary cases. Covers frontend plan Area D #1, #2, #3. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
thomasluizon
added a commit
that referenced
this pull request
Apr 15, 2026
DraggableFlatList previously had no getItemLayout, so React Native had to measure every row before rendering during initial scroll and drag events. With 40+ habits on mid-tier Android this produces visible jank. Adds an approximate ESTIMATED_HABIT_ITEM_HEIGHT=104 and wires getItemLayout onto the primary DraggableFlatList driver. The value does not need to be perfect: telling RN that rows are of roughly uniform height unlocks scroll-to-offset fast-paths and smoother drag. Covers frontend plan Area C #3 (P0 #9). Note: Splitting habit-list.tsx + habit-card.tsx into smaller files (Area C #1, #2) is deferred as a TODO — it is a large refactor across 2,119 + 1,511 LOC and is better done in a dedicated PR with profiling measurements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced May 18, 2026
This was referenced Jun 22, 2026
Merged
Merged
This was referenced Jul 3, 2026
thomasluizon
added a commit
that referenced
this pull request
Jul 10, 2026
…h) (#441) Stage 7h of the harness-upgrade plan, paired with agentic-dev-workflow PR #2 (the generic dual-target hook engine). Gives Orbit opencode enforcement parity on this machine using the same shared-logic-core + adapter pattern the pack standardizes: every rule lives once, both tools enforce it, no twin drift. Shared logic core — .claude/hooks/_lib/ (pure, both tools call it): - rules-git.mjs checkGitCommand (protected-ref push, bypass flags, commit -n) + checkNpmExpoPin (Expo SDK 57 pin guard) - rules-content.mjs checkEmDashes + checkBrandColors (scan only the added text) - rules-source.mjs checkTsAntipatterns, checkNewTodos, checkCsharpAuthz, checkCsharpTimezone, checkCsharpFluentConfig (whole-file) - rules-parity.mjs classifyScope + parityMessages (cross-platform nudge) - io.mjs payload normalizers for both tools Claude Code side: all 10 hooks refactored into thin adapters over _lib (byte-faithful — the exact regexes and stderr messages are preserved; settings.json wiring unchanged since the filenames are unchanged). opencode side: .opencode/plugin/orbit-guardrails.js — one plugin wiring the SAME _lib. tool.execute.before runs the git/Expo-pin + added-text content rules (block by throw); tool.execute.after runs the whole-file rules + parity nudge (a throw surfaces the violation the way the CC PostToolUse exit-2 does); event/session.idle emits a best-effort proactivity nudge. opencode auto-loads it from .opencode/plugin/. Mapping note: opencode has no PostToolUse, so whole-file rules run in tool.execute.after (file written) and added-text rules in tool.execute.before (can block); the proactivity Stop-gate degrades to an idle nudge because opencode cannot rewind a finished turn. Proof (.claude/hooks/test-hooks.mjs, 42 assertions): _lib unit checks + the REAL Claude Code hooks (regression guard, confirming the refactor preserved behavior) + the REAL opencode plugin — the same rule yields the same verdict in both tools. Cross-links agentic-dev-workflow PR #2. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 10, 2026
thomasluizon
added a commit
that referenced
this pull request
Jul 19, 2026
Two problems, one of which made every previous number meaningless. THE ANSWER KEY. judge-surfaces.mjs was feeding the judge the list of defects a human had already found (the user-found-defects spec). A judge handed the answer key can quote a defect instead of seeing it, and one recorded finding does exactly that: it says it CANNOT verify "known defect #2", by number. Recall was unmeasurable by construction. That spec is no longer in the prompt. CALIBRATION. Nobody had ever measured what fraction of known defects the judge catches. Now measured, against the 12 human-found defects: ADJUDICATED RECALL, defects it could see: 0/7 (0.0%) ADJUDICATED RECALL, all known defects: 0/12 (0.0%) STRUCTURALLY INVISIBLE to the pipeline: 5/12 The first cut of calibrate-judge.mjs scored 3 hits and would have reported 42.9%. Reading the matched text showed all three were spurious - "title" matched inside "toast covers the page title", "chevron" matched an unrelated nav row. Every candidate is now adjudicated by reading it, each rejection carries its reason in the tool, and the tool prints the contamination warning above so the number is never quoted without it. So the judge stops being a completion oracle and becomes what the evidence supports: a defect detector. It can VETO a cell via a blocker finding; it can never grant one. "blocker" is now defined as something a user would hit - text overflowing or truncated, overlapping elements, wrong locale, a visible functional failure - and taste complaints are explicitly minor and advisory. Its output moves to a cell-keyed report under .claude/manifests/, pinned to the surface's visual signature (so a report describing a since-rewritten surface cannot carry forward), and COMMITTED rather than living in a gitignored artifacts folder, so findings survive the session that produced them. capture-surfaces.mjs gains the state axis in its artifact names, and now reports - rather than silently mis-fills - the two cell classes it cannot photograph: a non-default state (the live stack can only render whatever the seeded database holds) and any mobile cell (no React Native capture pipeline exists). A populated screenshot filed against an `empty` cell would be worse than no artifact, because it would look like evidence. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SAUfXRAgg19p9zHPsAuYEt
This was referenced Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
role="presentation"to backdrop overlays; addrole="button"to habit-card article; addrole="menu"to action menu portals; restructure checklist-templates into proper button elements<button>elements which handle keyboard nativelyrole="button"to habit-card articlerole="checkbox"to habit-card selection buttontabIndex={0}to tablist containerFiles Changed (14)
app-overlay.tsxrole="presentation"on overlay,aria-hiddenon backdropall-done-celebration.tsx<output>to<button>withrole="status"wrappergoal-completed-celebration.tsx<div>to<button>withrole="status"wrapperstreak-celebration.tsx<output>to<button>withrole="status"wrapperstreak-freeze-celebration.tsx<div>to<button>withrole="status"wrapperwelcome-back-toast.tsx<div>to<button>goal-list.tsxrole="group"+aria-roledescriptionon draggable itemshabit-card.tsxrole="button"on article,role="checkbox"on selection,role="menu"on actionschecklist-templates.tsx<button>elementsbreakdown-suggestion.tsxaria-hiddennotification-bell.tsxrole="presentation"on backdropapp-date-picker.tsxrole="presentation"on backdroppage.tsx(app)tabIndex={0}on tablist,role="menu"on dropdownpage.tsx(ai-settings)role="button"+ keyboard handling on fact itemsTest plan
Generated with Claude Code