Skip to content

fix(account): stop telling non-flygd members their first sync is pending - #46

Merged
guarzo merged 1 commit into
mainfrom
fix/contacts-state-for-non-targets
Aug 3, 2026
Merged

fix(account): stop telling non-flygd members their first sync is pending#46
guarzo merged 1 commit into
mainfrom
fix/contacts-state-for-non-targets

Conversation

@guarzo

@guarzo guarzo commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Stacked on #42 — review that one first; this diff is only the last commit.

The bug

contact_sync_state rows are written only inside for (const target of flygd)
in src/jobs/contacts.ts:74, where flygd is getFlygdCharacters (tier
flygd, affiliation_invalid = false). Nothing else calls recordResult.

So for every blue and green member contactSyncResult is null permanently,
and the account page read that structural absence as a pending first run:

  • the STANDINGS cell said not yet run forever
  • the first-run notice fired forever — a member who joined a year ago was still
    being told their first sync hadn't happened
  • the contact-label footnote claimed authGD manages a label on their characters,
    which for a blue member it never does

A flygd character CCP reports as gone (affiliation_invalid) hits the same path:
dropped from the desired set, so it stops accruing results for the same reason.

The fix

AccountView carries contactsTarget per character, derived by
isContactsTarget — a pure predicate colocated with getFlygdCharacters so the
two definitions cannot drift, with a test asserting they agree on the same rows.

Where the concept doesn't apply the cell reads rather than asserting a state.
The notice is scoped to characters that can actually be waiting on a first run.
The footnote is shown only to accounts it describes.

No schema change, no migration, no new query — affiliation_invalid was already
in the row being selected.

What this deliberately does not do

There is no per-character record of "your standing was delivered into the FLYGD
members' contact lists", and there can't be one without new persisted state. The
account-level question is already answered honestly by the LAST PUSHED section
from #42, for every tier. Building a per-character delivery ledger to re-answer
it would mean a migration for no new information.

Tradeoff: a brand-new blue member no longer sees a first-run reassurance. That
message was never true-by-measurement for them — it was a null being read as a
state — and LAST PUSHED gives them the real cadence instead.

Conflicts

Resolved. #41 has merged, and its column note is where the fix now lands: the
header it introduces reads Standings after #42's rename, and showContactsNote
now requires contactsTarget as well as contactsNoteApplies, so a blue member
keeps the note in the accessible tree as the column's description without it
becoming visible copy about something that never happens to them.

Rebased onto the rewritten #42 branch after #42 was rebased on main.

Verification

  • npx tsc --noEmit — clean
  • npx prettier --check . — all files match
  • npx eslint . — 0 errors, 5 warnings (pre-existing-style no-img-element)
  • npx vitest run — 356 passed (47 files)
  • npx playwright test — 18 passed

@coderabbitai

coderabbitai Bot commented Aug 3, 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: 2 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 Plus

Run ID: 6be74692-894d-496e-bfc0-54636584d72a

📥 Commits

Reviewing files that changed from the base of the PR and between ae78763 and 6086c74.

📒 Files selected for processing (6)
  • e2e/account.spec.ts
  • src/app/account/page.tsx
  • src/services/account-view.ts
  • src/services/desired.ts
  • tests/account-view.test.ts
  • tests/desired.test.ts

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

@guarzo
guarzo force-pushed the fix/contacts-state-for-non-targets branch from 9528882 to f4e9482 Compare August 3, 2026 22:24
@guarzo
guarzo force-pushed the fix/contacts-state-for-non-targets branch 2 times, most recently from db6283d to ced35e4 Compare August 3, 2026 22:54
@guarzo
guarzo force-pushed the fix/contacts-state-for-non-targets branch from ced35e4 to 643cece Compare August 3, 2026 22:57
Base automatically changed from worktree-account-closing-beat to main August 3, 2026 23:00
contact_sync_state rows are written only for characters in
getFlygdCharacters (src/jobs/contacts.ts:74) — tier flygd, affiliation
valid. Nothing else calls recordResult. So for every blue and green
member contactSyncResult is null permanently, and the account page read
that structural absence as a pending first run:

- the STANDINGS cell said "not yet run" forever
- the first-run notice fired forever
- the contact-label footnote claimed authGD manages a label on their
  characters, which it never does

A flygd character CCP reports as gone hits the same path: excluded from
the desired set, so it stops accruing results for the same reason.

AccountView now carries contactsTarget per character, derived by
isContactsTarget — a pure predicate colocated with getFlygdCharacters so
the two definitions cannot drift, with a test asserting they agree on the
same rows. Where the concept does not apply the cell reads "—" rather
than asserting a state, the notice is scoped to characters that can
actually be waiting on a first run, and the footnote is shown only to
accounts it describes.

The account-level question is untouched: LAST PUSHED already answers "is
my standing being pushed, and when next" for every tier, which is where
that belongs.
@guarzo
guarzo force-pushed the fix/contacts-state-for-non-targets branch from 643cece to 6086c74 Compare August 3, 2026 23:03
@guarzo
guarzo merged commit 3caa789 into main Aug 3, 2026
5 checks passed
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.

1 participant