Skip to content

feat: add leetcode.cn support to TUI login flow#9

Merged
night-slayer18 merged 1 commit into
night-slayer18:devfrom
dong-frank:dev/leetcode.cn
Apr 21, 2026
Merged

feat: add leetcode.cn support to TUI login flow#9
night-slayer18 merged 1 commit into
night-slayer18:devfrom
dong-frank:dev/leetcode.cn

Conversation

@dong-frank
Copy link
Copy Markdown
Contributor

Summary

I first tested the current leetcode.cn flow directly in the built CLI with:

node dist/index.js login   # pick leetcode.cn
node dist/index.js daily
node dist/index.js stats

Those worked correctly on my side.

After that, I tried logging in through the TUI and found that the TUI login flow still did not support selecting leetcode.cn directly. This PR adds that missing TUI implementation.

What This PR Changes

  • add a site-selection step to the TUI login flow
  • allow choosing leetcode.com or leetcode.cn directly inside TUI login
  • update the login instructions to show the correct cookie domain for the selected site
  • persist the selected site before validating credentials
  • configure the site-aware LeetCode client before auth checks
  • add tests covering the new TUI login flow

@night-slayer18 night-slayer18 merged commit f9e6d4c into night-slayer18:dev Apr 21, 2026
12 checks passed
@dong-frank dong-frank deleted the dev/leetcode.cn branch April 21, 2026 15:32
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.

2 participants