Repository navigation
Fill records, part 1: core rules - #33
Merged
Merged
Conversation
This was referenced Nov 21, 2026
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.
PR 1 of 3 for roadmap item 3: a fill records "what I told them" on the linked application. This PR adds the pure
core/rules only. Nothing in the popup calls them yet; that comes in PR 2.What changes
Statement.source?: 'fill',Statement.question?: string,Application.formUrls?: string[]. Editing a statement dropssource, because the value is now the owner's. Export and restore keep the new fields, and a test proves it.core/src/form-link.ts:formUrlKeyturns a form address into its posting address. It strips/applyon Lever and/applicationon Ashby.findApplicationsForFormlooks for a match in three steps: hand-linkedformUrlsfirst, then the job's canonical URL, then the application's own URL. Archived applications are excluded.linkFormOpsadds the key to the chosen application and moves it off any other, capped at 20 keys.core/src/fill-records.ts:fillRecordOpsmakes one statement per answer row the fill wrote or found already matching, with the form's question (trimmed, at most 300 characters). It skips values already recorded, so filling the same form again adds nothing. It sets the site type only when that is empty and notother.core/src/told-panel.ts:toldPanellists the canonical answers not yet recorded on the application and says whether to offer Mark Applied (no status, or Interested).recordTickedOpsandmarkAppliedOpsbuild the writes for its buttons.core/src/form-application.ts:newApplicationFromFormOpsbuilds the job, the application and any held fill's statements as one list of writes. The new job's canonical URL is the form key, so the form matches on reopen.Every reader tolerates odd restored data: non-array
formUrls, non-string entries, null values, and missing applications (these returnmissing: trueand write nothing). Each builder returns one list of writes for a singleapply.No change to
shell/fill/**, the fill lint rules,guard/**,FILL_TOKENSor permissions.Gate
npm run gatepasses: 1920 unit tests (baseline 1857), 18 build tests, ESLint 0 warnings,web-ext lint0 errors and 2 warnings (unchanged).Notes for PR 2
Both
linkFormOpsandfillRecordOpscan write the whole application record. When the popup links a form and records a held fill in the sameapply, it must feed the linked record intofillRecordOps. Otherwise the last write would drop eitherformUrlsorsiteType.