Skip to content

feat(settings): copy-and-open button and countdown for Simkl sign-in - #765

Merged
ProdigyV21 merged 4 commits into
ProdigyV21:mainfrom
ReichiMD:claude/trusting-bohr-hdrstf
Sep 27, 2026
Merged

ProdigyV21 merged 4 commits into
ProdigyV21:mainfrom
ReichiMD:claude/trusting-bohr-hdrstf

Conversation

@ReichiMD

Copy link
Copy Markdown
Contributor

What this changes

Follow-up to #740, answering the request there: "Can you implement the same thing for simkl?"

On a phone the Simkl dialog had no button at all — you had to remember the code, open a browser, type simkl.com/pin and then type the code. Now:

  • Phone: one button, "Copy code & open Simkl". It copies the code and opens the Simkl PIN page in the same tap; the user long-presses the field and pastes.
  • Phone and TV: the dialog shows the time left on the code (countdown + bar), the same as the Trakt dialog.
  • The poll loop now uses the same deadline the dialog counts down to and stops exactly at it, like the Trakt loop (before, it could keep the dialog at 0:00 for one more interval).

Why it isn't exactly like Trakt

Trakt takes the code from the link (auth.trakt.tv/activate/<code>), so there the code is filled in for you. Simkl's PIN page doesn't — ARVIO uses Simkl's older sign-in (auth v1), and I checked on a phone: simkl.com/pin/<code> opens with an empty field. So copying the code is the closest we can get with v1. For the same reason:

  • the TV QR code still points at the plain simkl.com/pin page, and
  • the Simkl dialog uses its own instruction lines instead of the shared settings_activation_instruction_* ones, since those say the code travels with the link or QR.

Simkl's newer sign-in (auth v2) does return a ready-made link with the code in it (verification_uri_complete). Their docs say v1 "is expected to stop working around April 2027". Moving to v2 needs a new app registration, a change to the Simkl proxy, token refresh in the app, and every user reconnecting once — those are your calls, so it's not in this PR. Happy to help with it if you want it.

Not included either: the "connected" / "expired + retry" panels from #740. Those texts are Trakt-specific, and adding them would make this PR bigger. On expiry Simkl keeps its current behaviour (the dialog closes with the "timed out" message).

Files

Testing

  • Test build of this exact change (debug, own package): compiles, all unit tests pass.
  • Phone: the button copies the code and opens the Simkl PIN page, paste works, the countdown runs, and Simkl connects — ✅ tested on a real device.
  • TV: only the countdown is new there; the QR code and text are unchanged. Not checked on a TV.
Screenshot_20260927-102834

created by Claude (Anthropic) on behalf of @ReichiMD

On a phone the Simkl dialog had no button at all: the user had to remember
the code, open a browser, type simkl.com/pin and then the code. It now gets
one button that copies the code and opens the Simkl PIN page in the same
tap, plus the countdown Trakt already shows.

Simkl's PIN page (auth v1) does not take the code from the link, so unlike
Trakt the user still pastes it once. The dialog uses its own instruction
lines for that reason: the shared activation lines promise the code travels
with the link or QR.

The poll loop now uses the same deadline the dialog counts down to and stops
exactly at it, like the Trakt loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014rA75sz1Mv4eqa3oMsgNHN
@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Sep 27, 2026
@ProdigyV21

Copy link
Copy Markdown
Owner

Reviewed the copy-and-open flow and shared expiry deadline. I also separated Cancel from Disconnect: closing the activation dialog now only cancels polling and clears the dialog, without disconnecting an account or uploading a disconnect. Both Android variants compile and the targeted 128-test batch passes. Live Simkl authorization was not tested with a real account. Original commits/authorship preserved.

@ProdigyV21
ProdigyV21 merged commit 5f6d68e into ProdigyV21:main Sep 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: android Changes to the Android app or Gradle build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants