Skip to content

fix: prevent access token list duplication - #878

Closed
fzlzjerry wants to merge 1 commit into
l3montree-dev:mainfrom
fzlzjerry:fix/2803-access-token-duplicates
Closed

fix: prevent access token list duplication#878
fzlzjerry wants to merge 1 commit into
l3montree-dev:mainfrom
fzlzjerry:fix/2803-access-token-duplicates

Conversation

@fzlzjerry

Copy link
Copy Markdown

Summary

  • merge personal access token state by stable token ID across API data, session storage, and cross-hook events
  • preserve separately created token types that do not expose a fingerprint
  • unsubscribe token event listeners when hook consumers unmount
  • add lifecycle regression coverage for navigation remounts and distinct newly created tokens

Fixes l3montree-dev/devguard#2803.

Validation

  • npm test -- --runInBand (8 suites, 34 tests)
  • npx tsc --noEmit --pretty false
  • npx prettier --check src/hooks/usePersonalAccessToken.ts src/hooks/usePersonalAccessToken.test.tsx
  • git diff --check

The npm, Jest, TypeScript, and formatting checks were run with Node 26.5.0 and npm 11.17.0, matching the repository's declared engine range.

Signed-off-by: Morax <james20081204@gmail.com>
@fzlzjerry
fzlzjerry marked this pull request as ready for review August 11, 2026 08:57
Copilot AI lite review requested due to automatic review settings August 11, 2026 08:57

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@juliankepka

Copy link
Copy Markdown
Collaborator

Hello @fzlzjerry, thank you for opening this pull request! Unfortunately, while working on a related issue I ended up fixing this one along the way, so I'll have to close your PR here.

I appreciate the effort you put in. If you're up for it, feel free to take a look at the newly opened tickets. There might be a next task waiting for you there. Thanks again, and happy to have you contributing! :)

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.

Acess Tokens multiply upon navigation back to settings

3 participants