Skip to content

fix(tracking): whole connection source card is clickable - #18

Merged
DysektAI merged 5 commits into
masterfrom
fix/tracker-source-card-click
Jul 27, 2026
Merged

fix(tracking): whole connection source card is clickable#18
DysektAI merged 5 commits into
masterfrom
fix/tracker-source-card-click

Conversation

@DysektAI

@DysektAI DysektAI commented Jul 24, 2026

Copy link
Copy Markdown
Member

Root cause

The TT.org / TT.io source cards render with cursor: pointer and a hover style, implying the whole card is the hit target, but only the nested MudRadio changed selection. Clicking the card body hit the wrapper and did nothing (#13).

Fix

  • Make the full source-card wrappers select TT.org or TT.io in both Tracking settings and the Change connection dialog.
  • Stop nested radio clicks from bubbling into the card handler, avoiding duplicate state updates.
  • Disable and guard source selection while a credential test is running.
  • Snapshot the submitted provider for the complete async validation and persistence operation, preventing a validated token from ever being stored for a different provider.
  • Add focused regression contract tests for both UI surfaces and the async provider invariant.

Validation

  • Debug build: 0 warnings, 0 errors.
  • Debug tests: 213 passed, 5 fixture-dependent scan tests skipped.
  • Release build: 0 warnings, 0 errors.
  • Release tests: 213 passed, 5 fixture-dependent scan tests skipped.
  • dotnet csharpier check .: clean.
  • Tier 3 Windows WPF/WebView smoke: card-body clicks switched TT.io and TT.org correctly in both Tracking settings and the Change connection dialog.

Fixes #13


Open in Devin Review

Summary by cubic

Make the entire TT.org and TT.io source cards clickable; also harden selection by blocking changes during connection tests, stopping radio click bubbling, and snapshotting the chosen provider during submission. Applies to Tracking settings and the Change connection dialog; the radio remains the only keyboard-focusable control.

Written for commit 0f5c4ac. Summary will update on new commits.

Review in cubic

Greptile Summary

This PR fixes issue #13 where clicking the card body on TT.org / TT.io source cards had no effect — only clicking the nested MudRadio input toggled the selection. The fix adds @onclick handlers to both card wrapper divs in SettingsTracking.razor and ChangeConnectionDialog.razor, invoking the same idempotent handlers already used by the MudRadioGroup's ValueChanged callback.

  • SettingsTracking.razor: Cards now call OnPvpDraftSourceChanged(PvpSource.Org/Io) on click; handler is synchronous, sets _pvpDraftSource, and clears both error fields.
  • ChangeConnectionDialog.razor: Cards now call OnDraftSourceChanged(PvpSource.Org/Io) on click; handler is synchronous, sets _draftSource, and clears _error. The radio remains the sole keyboard-focusable control as documented in the PR.

Confidence Score: 5/5

Safe to merge — the changes are two symmetric, four-line additions that wire pointer clicks on card wrappers to the same handlers already invoked by the radio group.

Both handlers are synchronous and idempotent: they assign a local draft field and clear an error string. Whether the handler fires once (card body click) or twice (radio button click bubbles through both paths), the result is identical state. No async work, no persistence, and no side effects are triggered by the new @OnClick bindings.

Files Needing Attention: No files require special attention.

Important Files Changed

Filename Overview
src/App/Components/ChangeConnectionDialog.razor Adds @OnClick to both source-card divs, calling the existing idempotent OnDraftSourceChanged handler — correct and minimal change.
src/App/Pages/App/Settings/SettingsTracking.razor Adds @OnClick to both source-card divs, calling the existing idempotent OnPvpDraftSourceChanged handler — correct and minimal change.

Sequence Diagram

sequenceDiagram
    participant User
    participant CardDiv as Card div (@onclick)
    participant MudRadio as MudRadio (keyboard)
    participant MudRadioGroup as MudRadioGroup (ValueChanged)
    participant Handler as OnDraftSourceChanged / OnPvpDraftSourceChanged

    Note over User,Handler: Before fix — only radio click worked
    User->>MudRadio: click radio button only
    MudRadio->>MudRadioGroup: change event
    MudRadioGroup->>Handler: ValueChanged(source)
    Handler-->>CardDiv: re-render (selected class applied)

    Note over User,Handler: After fix — full card is the hit target
    User->>CardDiv: click anywhere on card body
    CardDiv->>Handler: "@onclick → handler(source)"
    Handler-->>CardDiv: re-render (selected class applied)

    User->>MudRadio: click radio (still works)
    MudRadio->>MudRadioGroup: change event
    MudRadioGroup->>Handler: ValueChanged(source)
    Note right of Handler: handler idempotent — safe if both paths fire
    CardDiv->>Handler: "@onclick bubbles (same source, same result)"
    Handler-->>CardDiv: re-render (no-op state change)
Loading

Reviews (1): Last reviewed commit: "fix(tracking): make whole connection sou..." | Re-trigger Greptile

Context used:

  • Context used - AGENTS.md (source)

The TT.org / TT.io source cards rendered with cursor:pointer but only
the nested radio input actually toggled the selection; clicking the
card body did nothing (issue #13). The card wrappers now invoke the
same source-change handler as the radio, in both the tracking settings
page and the change-connection dialog. The radio remains the single
keyboard-focusable control.

Fixes #13
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 20 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 91dd97b3-9042-4be0-b242-74c56bcad04c

📥 Commits

Reviewing files that changed from the base of the PR and between 9458047 and 0f5c4ac.

📒 Files selected for processing (3)
  • src/App/Components/ChangeConnectionDialog.razor
  • src/App/Pages/App/Settings/SettingsTracking.razor
  • tests/RatScanner.Tests/TrackingSourceCardContractTests.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tracker-source-card-click

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

greptile-apps[bot]
greptile-apps Bot previously approved these changes Jul 25, 2026
@codeant-ai

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

greptile-apps[bot]

This comment was marked as resolved.

greptile-apps[bot]

This comment was marked as resolved.

@greptile-apps
greptile-apps Bot dismissed their stale review July 27, 2026 08:27

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

@DysektAI DysektAI self-assigned this Jul 27, 2026
@DysektAI
DysektAI merged commit 2c165ab into master Jul 27, 2026
15 checks passed
@DysektAI
DysektAI deleted the fix/tracker-source-card-click branch July 27, 2026 08:35
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.

Tracking connection source buttons

1 participant