Skip to content

feat(FR-2630): add useSToken hook with nuqs and stoken deprecation warning#6852

Merged
graphite-app[bot] merged 1 commit into
mainfrom
04-21-feat_fr-2630_add_usestoken_hook_with_nuqs_and_stoken_deprecation_warning
Apr 23, 2026
Merged

feat(FR-2630): add useSToken hook with nuqs and stoken deprecation warning#6852
graphite-app[bot] merged 1 commit into
mainfrom
04-21-feat_fr-2630_add_usestoken_hook_with_nuqs_and_stoken_deprecation_warning

Conversation

@nowgnuesLee
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee commented Apr 21, 2026

Resolves FR-2630 (sub-task of Epic FR-2616)

resolves #NNN (FR-MMM)

Checklist: (if applicable)

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Stack

This PR is part of the Story 1 stack for Epic FR-2616 (Extract sToken login flow into reusable boundary component). See the dev plan for the full scope. The Story 1 PR stack is #6850#6851#6852#6853#6854#6855#6856 on top of spec PR #6828.

Copy link
Copy Markdown
Contributor Author

nowgnuesLee commented Apr 21, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
8.59% (-0% 🔻)
1758/20472
🔴 Branches
7.86% (-0% 🔻)
1131/14384
🔴 Functions
5.15% (+0.01% 🔼)
286/5552
🔴 Lines
8.31% (-0% 🔻)
1650/19862
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴 hooks/useSToken.ts 0% 0% 0% 0%

Test suite run success

856 tests passing in 39 suites.

Report generated by 🧪jest coverage report action from fa2be96

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a dedicated useSToken hook in the React WebUI to read an sToken from URL query params via nuqs, prefer the canonical sToken key, and warn once when the deprecated lowercase stoken key is used. This supports the FR-2616 effort to extract the sToken login flow into a reusable STokenLoginBoundary.

Changes:

  • Introduces react/src/hooks/useSToken.ts to resolve sToken vs stoken (fallback) and emit a one-time deprecation warning.
  • Provides a tuple API returning the effective token and a setter intended to clear token-related query params.

Comment thread react/src/hooks/useSToken.ts
Comment thread react/src/hooks/useSToken.ts Outdated
Comment thread react/src/hooks/useSToken.ts
@nowgnuesLee nowgnuesLee force-pushed the 04-21-feat_fr-2630_add_usestoken_hook_with_nuqs_and_stoken_deprecation_warning branch from 68fc2d7 to 61a25de Compare April 23, 2026 07:57
@nowgnuesLee nowgnuesLee force-pushed the 04-21-feat_fr-2629_extend_tokenlogin_helper_with_optional_extraparams branch from ddbf758 to 4db323c Compare April 23, 2026 07:57
@nowgnuesLee nowgnuesLee force-pushed the 04-21-feat_fr-2630_add_usestoken_hook_with_nuqs_and_stoken_deprecation_warning branch from 61a25de to f6760d3 Compare April 23, 2026 08:02
@nowgnuesLee nowgnuesLee force-pushed the 04-21-feat_fr-2629_extend_tokenlogin_helper_with_optional_extraparams branch from 4db323c to 66e3c56 Compare April 23, 2026 08:02
@nowgnuesLee nowgnuesLee force-pushed the 04-21-feat_fr-2630_add_usestoken_hook_with_nuqs_and_stoken_deprecation_warning branch from f6760d3 to b931e8a Compare April 23, 2026 08:35
Copy link
Copy Markdown
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 23, 2026

Merge activity

…rning (#6852)

Resolves FR-2630 (sub-task of Epic [FR-2616](https://lablup.atlassian.net/browse/FR-2616))

resolves #NNN (FR-MMM)
<!-- replace NNN, MMM with the GitHub issue number and the corresponding Jira issue number. -->

<!--
Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes,
and how it affects the users and other developers.
-->

**Checklist:** (if applicable)

- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

## Stack

This PR is part of the Story 1 stack for Epic FR-2616 (Extract sToken login flow into reusable boundary component). See the [dev plan](../blob/main/.specs/draft-stoken-login-boundary/dev-plan.md) for the full scope. The Story 1 PR stack is #6850#6851#6852#6853#6854#6855#6856 on top of spec PR #6828.

[FR-2616]: https://lablup.atlassian.net/browse/FR-2616?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
graphite-app Bot pushed a commit that referenced this pull request Apr 23, 2026
…int (#6850)

Resolves FR-2628 (sub-task of Epic [FR-2616](https://lablup.atlassian.net/browse/FR-2616))

resolves #NNN (FR-MMM)
<!-- replace NNN, MMM with the GitHub issue number and the corresponding Jira issue number. -->

<!--
Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes,
and how it affects the users and other developers.
-->

**Checklist:** (if applicable)

- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

## Stack

This PR is part of the Story 1 stack for Epic FR-2616 (Extract sToken login flow into reusable boundary component). See the [dev plan](../blob/main/.specs/draft-stoken-login-boundary/dev-plan.md) for the full scope. The Story 1 PR stack is #6850#6851#6852#6853#6854#6855#6856 on top of spec PR #6828.

[FR-2616]: https://lablup.atlassian.net/browse/FR-2616?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
graphite-app Bot pushed a commit that referenced this pull request Apr 23, 2026
)

Resolves FR-2629 (sub-task of Epic [FR-2616](https://lablup.atlassian.net/browse/FR-2616))

resolves #NNN (FR-MMM)
<!-- replace NNN, MMM with the GitHub issue number and the corresponding Jira issue number. -->

<!--
Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes,
and how it affects the users and other developers.
-->

**Checklist:** (if applicable)

- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

## Stack

This PR is part of the Story 1 stack for Epic FR-2616 (Extract sToken login flow into reusable boundary component). See the [dev plan](../blob/main/.specs/draft-stoken-login-boundary/dev-plan.md) for the full scope. The Story 1 PR stack is #6850#6851#6852#6853#6854#6855#6856 on top of spec PR #6828.

[FR-2616]: https://lablup.atlassian.net/browse/FR-2616?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app Bot force-pushed the 04-21-feat_fr-2629_extend_tokenlogin_helper_with_optional_extraparams branch from 66e3c56 to 7d1542e Compare April 23, 2026 10:33
@graphite-app graphite-app Bot force-pushed the 04-21-feat_fr-2630_add_usestoken_hook_with_nuqs_and_stoken_deprecation_warning branch from b931e8a to fa2be96 Compare April 23, 2026 10:34
graphite-app Bot pushed a commit that referenced this pull request Apr 23, 2026
Resolves FR-2631 (sub-task of Epic [FR-2616](https://lablup.atlassian.net/browse/FR-2616))

resolves #NNN (FR-MMM)
<!-- replace NNN, MMM with the GitHub issue number and the corresponding Jira issue number. -->

<!--
Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes,
and how it affects the users and other developers.
-->

**Checklist:** (if applicable)

- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

## Stack

This PR is part of the Story 1 stack for Epic FR-2616 (Extract sToken login flow into reusable boundary component). See the [dev plan](../blob/main/.specs/draft-stoken-login-boundary/dev-plan.md) for the full scope. The Story 1 PR stack is #6850#6851#6852#6853#6854#6855#6856 on top of spec PR #6828.

[FR-2616]: https://lablup.atlassian.net/browse/FR-2616?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
graphite-app Bot pushed a commit that referenced this pull request Apr 23, 2026
…Boundary (#6855)

Resolves FR-2632 (sub-task of Epic [FR-2616](https://lablup.atlassian.net/browse/FR-2616))

resolves #NNN (FR-MMM)
<!-- replace NNN, MMM with the GitHub issue number and the corresponding Jira issue number. -->

<!--
Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes,
and how it affects the users and other developers.
-->

**Checklist:** (if applicable)

- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

## Stack

This PR is part of the Story 1 stack for Epic FR-2616 (Extract sToken login flow into reusable boundary component). See the [dev plan](../blob/main/.specs/draft-stoken-login-boundary/dev-plan.md) for the full scope. The Story 1 PR stack is #6850#6851#6852#6853#6854#6855#6856 on top of spec PR #6828.

[FR-2616]: https://lablup.atlassian.net/browse/FR-2616?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
graphite-app Bot pushed a commit that referenced this pull request Apr 23, 2026
Resolves FR-2633 (sub-task of Epic [FR-2616](https://lablup.atlassian.net/browse/FR-2616))

resolves #NNN (FR-MMM)
<!-- replace NNN, MMM with the GitHub issue number and the corresponding Jira issue number. -->

<!--
Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes,
and how it affects the users and other developers.
-->

**Checklist:** (if applicable)

- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

## Stack

This PR is part of the Story 1 stack for Epic FR-2616 (Extract sToken login flow into reusable boundary component). See the [dev plan](../blob/main/.specs/draft-stoken-login-boundary/dev-plan.md) for the full scope. The Story 1 PR stack is #6850#6851#6852#6853#6854#6855#6856 on top of spec PR #6828.

[FR-2616]: https://lablup.atlassian.net/browse/FR-2616?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Base automatically changed from 04-21-feat_fr-2629_extend_tokenlogin_helper_with_optional_extraparams to main April 23, 2026 10:40
@graphite-app graphite-app Bot merged commit fa2be96 into main Apr 23, 2026
8 checks passed
@graphite-app graphite-app Bot deleted the 04-21-feat_fr-2630_add_usestoken_hook_with_nuqs_and_stoken_deprecation_warning branch April 23, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants