feat(fetch): Add company-specific job search capabilities#48
Merged
Conversation
Signed-off-by: wallentx <william.allentx@gmail.com>
wallentx
force-pushed
the
wallentx/cmd-cleanup
branch
from
June 15, 2026 14:51
0e15ee2 to
c76627b
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reworks the TUI fetch command from a general-purpose job search (with flags like --sources, --candidate-limit, --accepted-limit, --no-llm) to a company-targeted search (fetch <company> [--aka <name>] [--website <url>] [--all]). It adds new company matching logic in the fetcher layer, adapts source selection and LLM prompts for company-specific searches, and refactors the command footer view with dynamic height pinning.
Changes:
- Introduces
CompanyFetchOptions,companyFetchScope, andFetchCompanyJobsSkippingExistingWithCandidateCachein the fetcher, with company name/alias/website matching, post-fetch filtering, and company-targeted LLM/site-search prompts; disables RSS and API sources for company fetches - Replaces the old
fetchcommand options and:helpcommand in the TUI with company-targeted parsing, ghost hints, and tab completions; consolidates command result clearing intoclearOperatorCommandResult - Extracts the command footer into
commandFooterView()with a reserved completion line and pins it to the terminal bottom viacomposeTableAndHelpView
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
internal/fetcher/job_fetcher.go |
Adds CompanyFetchOptions, companyFetchScope, company matching/filtering, LLM prompt builder, and public FetchCompanyJobsSkippingExistingWithCandidateCache API |
internal/fetcher/company_names.go |
Adds "llc" and "llc." to company name suffix normalization list |
internal/fetcher/site_search_browser.go |
Adds siteSearchURLsForCompany, companyTargetSearchQueries, and indeedCompanySearchURLs for company-scoped site search |
internal/fetcher/site_search_browser_test.go |
Adds test for company site search URL building |
internal/fetcher/llm_web_search.go |
Adds buildCompanyLLMWebSearchPrompt and llmWebSearchQueriesForCompany |
internal/fetcher/llm_web_search_test.go |
Tests company LLM web search prompt and query generation |
internal/fetcher/job_fetcher_test.go |
Tests jobMatchesCompanyTarget with website and alias matching |
internal/tuiapp/command_mode.go |
Replaces fetch option flags with company targeting; removes :help; refactors shared helpers (commandAwaitingFlagValue, commandFlagValueHint) |
internal/tuiapp/command_mode_test.go |
Updates tests for the new fetch command format and footer layout |
internal/tuiapp/fetch_flow.go |
Adds company fields to fetchRunOptions; routes company fetches to the new API; conditionally skips LLM filtering with --all |
internal/tuiapp/update_keys.go |
Consolidates result clearing into clearOperatorCommandResult() at the top of the commanding block |
internal/tuiapp/view.go |
Extracts commandFooterView with reserved completion line; adds composeTableAndHelpView for dynamic footer pinning |
Signed-off-by: wallentx <william.allentx@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new capability for targeted company job searches, allowing the system to fetch jobs specifically for a given company, with support for company aliases and website verification. It adds a new API for company-specific job fetching, refines the job filtering logic to ensure accurate company matches, and adapts job source selection and prompt generation accordingly. Several changes also ensure that RSS and API sources are excluded from company-targeted searches, and comprehensive tests are added to validate the new matching logic.
Company-targeted job fetching and filtering:
CompanyFetchOptionsandcompanyFetchScopetypes, along with logic to activate company-specific fetches, aggregate company names/aliases, and match company websites. IntroducedfilterJobsByCompanyTargetandjobMatchesCompanyTargetto filter results by company name, aliases, and website, ensuring only relevant jobs are returned. [1] [2]FetchCompanyJobsSkippingExistingWithCandidateCachefunction, which disables RSS and API sources for company fetches and invokes the new scoped job fetching logic.Source selection and prompt adaptation:
buildCompanyLLMSearchPromptto generate LLM prompts tailored to company-targeted searches, including company details, aliases, website, and candidate criteria as needed.Testing and company name normalization:
TestJobMatchesCompanyTargetUsesWebsiteAndAliases) to verify company matching by name, alias, and website.cleanCompanyNameto recognize "llc" and "llc." as company suffixes for improved normalization.