Skip to content

fix(identity): preserve likes through login and account navigation - #658

Merged
harlan-zw merged 2 commits into
mainfrom
fix/liked-skills-visible
Oct 16, 2026
Merged

harlan-zw merged 2 commits into
mainfrom
fix/liked-skills-visible

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

An anonymous Like link could silently lose its action when the browser already had a signed-in session, for example after signing in in another tab. /login redirected to the Skill without saving the like. Removing a Skill from Your skills also left the shared heart state and count unchanged, so returning to the Skill still showed “Unlike” and another click sent a second DELETE.

Preserve supported Like and Watch actions through the existing sealed OAuth callback even when /login finds a session. Keep failed attempts on the retry screen so they cannot cause an automatic OAuth loop. Route account removal through useLikes.remove, updating all hearts after a successful DELETE and waiting for any initial list request so an older response cannot restore the deleted like.

Reproduced both cases on production using mattpocock/skills/tdd:

  • With TDD unliked and a session present, opening its anonymous /login?return_to=...&action=like-skill link returns to an empty heart.
  • Liking TDD, removing it in Your skills, and returning through client navigation leaves the heart pressed although GET /api/v1/account/likes no longer includes it.

The ordinary signed-out Like → GitHub → Skill flow succeeded during investigation. Returning to a previously opened Your skills list after liking TDD through client navigation also showed the new like. Login and session responses used private, no-store and bypassed the CDN cache. Temporary test likes were removed.

Related to skilld-dev/skilld#240. The report lacks exact steps, so these are verified related failures rather than a claim that the reporter encountered either one.

Validation:

  • Added regression coverage for Like/Watch intent with an existing session, error retry without a redirect loop, and ordinary signed-in return navigation. Four new cases fail against the old redirect.
  • Existing regression coverage checks account removal → heart → like again, failed removal, and an in-flight initial list.
  • CI run 38914678229 passed the full site test suite, build, lint, typecheck, declared Skills check, and Harness checks on commit 89f55a97.
  • All eight login tests passed locally when run alone, and ESLint passed on the changed login files. The parallel local Nuxt run hit startup and test timeouts under shared WSL load; the full hosted test run passed.

@harlan-zw harlan-zw changed the title fix(likes): sync hearts after account removal fix(identity): preserve likes through login and account navigation Oct 16, 2026
@harlan-zw
harlan-zw marked this pull request as ready for review October 16, 2026 14:34
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Oct 16, 2026
@harlan-github-agent

harlan-github-agent Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-10-16 15:03 UTC.

GitHub merged this pull request.

No material findings were recorded.

cc72019a-cc96-4514-96d3-aeb9b6381560

@harlan-github-agent harlan-github-agent Bot added harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Oct 16, 2026

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: READY.

Read the Review results

@harlan-zw
harlan-zw merged commit 6801177 into main Oct 16, 2026
8 checks passed
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Oct 16, 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