Skip to content

feat: company question list picker (leetcode.cn)#221

Open
fenixc9 wants to merge 2 commits into
kawre:masterfrom
fenixc9:feat/company-question-list
Open

feat: company question list picker (leetcode.cn)#221
fenixc9 wants to merge 2 commits into
kawre:masterfrom
fenixc9:feat/company-question-list

Conversation

@fenixc9

@fenixc9 fenixc9 commented Apr 23, 2026

Copy link
Copy Markdown

Summary

  • Add the ability to browse and solve company interview question lists from leetcode.cn
  • Users select a company from a searchable picker (e.g. 字节跳动, 腾讯, 阿里巴巴) and view that company's curated problem set
  • Adds a "Company" button on the Problems page and a Leet company command
  • Supports all four picker providers: fzf-lua, telescope, mini.pick, and snacks.picker
  • This feature is cn-only (like the existing Hot 100 study plan picker)

API Used

Endpoint Operation Purpose
/graphql/noj-go InterviewHotCompanyCards Fetch company list (slug, name, question count)
/graphql/ favoriteQuestionList Fetch questions for a specific company's favorite list

How it works

  1. User opens the menu → Problems page → clicks "Company" (or runs :Leet company)
  2. A picker displays all companies (sourced from leetcode.cn's interview company cards API)
  3. User selects a company
  4. The plugin fetches that company's question list via favoriteQuestionList(favoriteSlug: "{company-slug}-thirty-days")
  5. Questions are filtered against the local problem cache and displayed in the standard question picker

Files Changed

File Change
lua/leetcode-plugins/cn/queries.lua +2 GraphQL queries
lua/leetcode/api/problems.lua +2 API functions (company_list, company_questions)
lua/leetcode/picker/init.lua +P.company() entry point
lua/leetcode/command/init.lua +cmd.company() command
lua/leetcode-ui/group/page/problems.lua +Company button
lua/leetcode/picker/company/* +5 new files (company picker module)

fenixc9 and others added 2 commits April 24, 2026 00:59
Add the ability to browse and solve company interview question lists
from leetcode.cn. Users can select a company from a searchable picker
and view the company's curated problem set.

- Add InterviewHotCompanyCards and favoriteQuestionList GraphQL queries
- New company picker module with fzf-lua, telescope, mini.pick, and
  snacks.picker provider support
- `Leet company` command and "Company" button on the Problems page

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Replace garbled company button icon with nf-fa-building (U+F1AD)
- Use vim.empty_dict() for filter fields that must be JSON objects,
  not arrays, to fix GraphQL 400 error

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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