Skip to content

feat(fetch): Add company-specific job search capabilities#48

Merged
wallentx merged 2 commits into
mainfrom
wallentx/cmd-cleanup
Jun 15, 2026
Merged

feat(fetch): Add company-specific job search capabilities#48
wallentx merged 2 commits into
mainfrom
wallentx/cmd-cleanup

Conversation

@wallentx

Copy link
Copy Markdown
Owner

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:

  • Added CompanyFetchOptions and companyFetchScope types, along with logic to activate company-specific fetches, aggregate company names/aliases, and match company websites. Introduced filterJobsByCompanyTarget and jobMatchesCompanyTarget to filter results by company name, aliases, and website, ensuring only relevant jobs are returned. [1] [2]
  • Implemented the FetchCompanyJobsSkippingExistingWithCandidateCache function, which disables RSS and API sources for company fetches and invokes the new scoped job fetching logic.
  • Modified the main job fetching pipeline to apply company filtering after all jobs are fetched, and to record filtered-out jobs in the summary.

Source selection and prompt adaptation:

  • Adjusted source resolution and fetching logic to use company-specific criteria when a company fetch is active, including disabling RSS and API sources, customizing LLM prompts, and generating site search URLs for the target company. [1] [2] [3] [4] [5] [6] [7]
  • Added buildCompanyLLMSearchPrompt to generate LLM prompts tailored to company-targeted searches, including company details, aliases, website, and candidate criteria as needed.

Testing and company name normalization:

  • Added a unit test (TestJobMatchesCompanyTargetUsesWebsiteAndAliases) to verify company matching by name, alias, and website.
  • Updated cleanCompanyName to recognize "llc" and "llc." as company suffixes for improved normalization.

@wallentx
wallentx requested a review from Copilot June 15, 2026 14:49
@github-actions github-actions Bot added tests test-only or test-focused changes component:fetcher job fetching, sources, and enrichment component:tuiapp interactive application ui component:job-search job search, source selection, and validation labels Jun 15, 2026
@github-actions github-actions Bot added the added new user-facing functionality label Jun 15, 2026
Signed-off-by: wallentx <william.allentx@gmail.com>
@wallentx
wallentx force-pushed the wallentx/cmd-cleanup branch from 0e15ee2 to c76627b Compare June 15, 2026 14:51
Comment thread internal/fetcher/site_search_browser.go Fixed

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.

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, and FetchCompanyJobsSkippingExistingWithCandidateCache in 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 fetch command options and :help command in the TUI with company-targeted parsing, ghost hints, and tab completions; consolidates command result clearing into clearOperatorCommandResult
  • Extracts the command footer into commandFooterView() with a reserved completion line and pins it to the terminal bottom via composeTableAndHelpView

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

Comment thread internal/fetcher/site_search_browser_test.go Outdated
Comment thread internal/tuiapp/command_mode.go
Signed-off-by: wallentx <william.allentx@gmail.com>
Copilot AI review requested due to automatic review settings June 15, 2026 15:26

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.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

@wallentx
wallentx merged commit ce3885d into main Jun 15, 2026
9 checks passed
@wallentx
wallentx deleted the wallentx/cmd-cleanup branch June 15, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added new user-facing functionality component:fetcher job fetching, sources, and enrichment component:job-search job search, source selection, and validation component:tuiapp interactive application ui tests test-only or test-focused changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants