Skip to content

fix(account): keep a new-device row whose sign-in method this app does not know - #5171

Merged
devswha merged 1 commit into
mainfrom
fix/device-signin-unknown-method
Dec 1, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/device-signin-unknown-method

Conversation

@devswha

@devswha devswha commented Dec 1, 2026

Copy link
Copy Markdown
Owner

A row of the new-device feed whose sign-in method this app does not know (a newer service's provider, or a staging test sign-in) made deviceSignins drop the whole feed, so the "A new device signed in" card never showed and every account-level notice fell back to the per-PC ones.

  • The row is kept with provider: null, and the card leaves out the "{method} sign-in" part for it.
  • A row that is not well formed (bad key, number, time, revoked flag, or a provider that is not a string) still voids the feed, so the PC journal cursor stays where it is, as before.

Found in the staging check of #5167 (staging sign-ins use the test method): the service returned the row and the app showed no card.

Checks

  • src/lib/account/deviceSignins.test.ts: the new case fails without the change and passes with it.
  • src/App.deviceNotices.test.tsx (35) and bun run typecheck pass.

…s not know

One row with a provider other than github, google or apple (a newer service's method, a staging test sign-in) made the app drop the whole new-device feed, so no card showed. The row is kept and shown without its method; a row that is not well formed still voids the feed, which keeps the PC journal cursor where it is.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Device sign-in activity can now display entries with unrecognized sign-in providers instead of rejecting the entire feed.
    • Entries without a recognized sign-in method no longer show a formatted method in their details.

The device sign-in parser maps unsupported string providers to null while continuing to reject non-string providers. The sign-in card omits the sign-in-method detail when the provider is null.

Changes: Device sign-in provider handling

Layer / File(s) Summary
Parse and represent unknown providers
src/lib/account/deviceSignins.ts, src/lib/account/deviceSignins.test.ts
DeviceSignin.provider is nullable. Unsupported string values map to null, and tests cover this behavior. Non-string provider values remain invalid.
Omit unavailable sign-in method
src/components/DeviceSigninNotice.tsx
The card omits the sign-in-method detail when row.provider is absent.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • devswha/ovis#5167: Adds the new-device sign-in notice and references the unknown sign-in method seen during staging.
  • devswha/ovis#5147: Introduces the new-device notice that displays the sign-in method.
Merge Risk: Minimal · up to 5da20

Sign-ins with an unrecognized method now still appear in the new-device card, without a method label, instead of hiding the whole feed. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a new-device row with an unrecognized sign-in method is now kept instead of invalidating the feed. It is specific and matches the changeset, which maps unknown provide…
Description check Passed The description covers the problem, the resulting behavior, and the malformed-row cases that still void the feed. It also lists the checks run. It omits the changelog entry that the template's CONTRIB…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a new-device row with an unrecognized sign-in method is now kept instead of invalidating the feed. It is specific and matches the changeset, which maps unknown providers to null and updates the card and tests.

Full details: Description check

Explanation

The description covers the problem, the resulting behavior, and the malformed-row cases that still void the feed. It also lists the checks run. It omits the changelog entry that the template's CONTRIBUTING.md reference calls for, and it does not link an issue. It also does not mention contract-test coverage, which the template asks for on HTTP/WS changes. The validation section lists the checks run but not the skipped ones. These gaps are minor, so the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 31e4bbc and 5da206c.

Files selected for processing: 3

  • src/components/DeviceSigninNotice.tsx
  • src/lib/account/deviceSignins.test.ts
  • src/lib/account/deviceSignins.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

@devswha
devswha merged commit 31fdfaa into main Dec 1, 2026
15 checks passed
@devswha
devswha deleted the fix/device-signin-unknown-method branch December 1, 2026 22:39
@devswha

devswha commented Dec 1, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head 5da206c0b. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit reviewed this head.

Reviews: dori review (omo + Codex) CLEAR at 5da206c. Found by the staging check of #5167.

@devswha devswha mentioned this pull request Dec 1, 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.

1 participant