Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
1e38f6b
Add first and last name to My details
firegiant9000 Nov 20, 2026
4787270
Add fill scan types and validation
firegiant9000 Nov 20, 2026
2976255
Tighten fill scan validation
firegiant9000 Nov 20, 2026
b519712
Add label normalising for the fill matcher
firegiant9000 Nov 20, 2026
2b3ae47
Add the country table for work questions
firegiant9000 Nov 20, 2026
ce0fd6f
Tighten placeholder and negation checks
firegiant9000 Nov 20, 2026
ea97966
Add value comparison for the fill plan
firegiant9000 Nov 20, 2026
c198f09
Recognise more spellings of country names
firegiant9000 Nov 20, 2026
3e74257
Add the fill recognition tables
firegiant9000 Nov 20, 2026
4534d61
Add site type and frame advice for fills
firegiant9000 Nov 20, 2026
b865e61
Pin the fill recognition tables in tests
firegiant9000 Nov 20, 2026
1a0d226
Add control fit for the fill plan
firegiant9000 Nov 20, 2026
ab0a1a2
Add the fill plan
firegiant9000 Nov 20, 2026
d47af63
Add the fill result for later recording
firegiant9000 Nov 20, 2026
2a651c3
Merge pull request #27 from firegiant9000/feat/fill-core
firegiant9000 Nov 20, 2026
daa966e
Let the fill injector inject and guard its apply call
firegiant9000 Nov 20, 2026
028e4f3
Guard what the fill page script may do
firegiant9000 Nov 20, 2026
6dabfa9
Guard dynamic imports of the fill apply call
firegiant9000 Nov 20, 2026
2399725
Add the fill events helper
firegiant9000 Nov 20, 2026
8dc8435
Tighten the fill page script guard
firegiant9000 Nov 20, 2026
b60664c
Add label resolution for the fill scan
firegiant9000 Nov 20, 2026
2eb810a
Add the fill page scan
firegiant9000 Nov 20, 2026
fc3ff9f
Keep members' own labels out of group labels
firegiant9000 Nov 20, 2026
b2671be
Pick the application form and report known frames
firegiant9000 Nov 20, 2026
c3d6ea9
Close scan skip gaps and pin the scan defaults
firegiant9000 Nov 20, 2026
09a1dd1
Add the fill apply step
firegiant9000 Nov 20, 2026
cdeda26
Add the fill page script
firegiant9000 Nov 20, 2026
f6869f6
Check that each fill write took
firegiant9000 Nov 20, 2026
93a17a7
Check the built fill script for submit and click words
firegiant9000 Nov 20, 2026
89128a2
Add the fill injector
firegiant9000 Nov 20, 2026
a6e16ac
Add the fill controller
firegiant9000 Nov 20, 2026
26eecdf
Keep the fill controller from rejecting
firegiant9000 Nov 20, 2026
9d1b342
Merge pull request #28 from firegiant9000/feat/fill-page
firegiant9000 Nov 20, 2026
e55c253
Add the wording of the fill review
firegiant9000 Nov 20, 2026
7bd1ae3
Show the fill review in the popup
firegiant9000 Nov 20, 2026
bbe2f3f
Reword the claims for form filling
firegiant9000 Nov 20, 2026
f2ef3e1
Merge pull request #29 from firegiant9000/feat/fill-popup
firegiant9000 Nov 20, 2026
eb81c34
Merge remote-tracking branch 'origin/main' into feat/form-filler
firegiant9000 Nov 20, 2026
72f558a
Keep Fill usable when a subscriber or clock throws
firegiant9000 Nov 20, 2026
6f3dd84
Offer no second fill after an unconfirmed one, and show what will fill
firegiant9000 Nov 20, 2026
a1a2748
Skip visually hidden fields and guard radio groups with a checked member
firegiant9000 Nov 20, 2026
252a898
Recheck each field before writing and undo a write that did not take
firegiant9000 Nov 20, 2026
bae40ee
Catch fields hidden by a parent, unrendered fields and form-owned radios
firegiant9000 Nov 20, 2026
0670154
Test the undo paths and later group members in apply
firegiant9000 Nov 20, 2026
f2ad5f2
Keep fields that a non-clipping parent cannot hide
firegiant9000 Nov 20, 2026
88449d9
Enforce the fill claims in lint
firegiant9000 Nov 20, 2026
2990583
Close the scan import and fill() call gaps in lint
firegiant9000 Nov 20, 2026
9c50184
Catch parent-relative and template imports of the fill modules
firegiant9000 Nov 20, 2026
07a0203
Hide a field only behind a clipping parent of 1px or less
firegiant9000 Nov 20, 2026
41538a5
Close the last fill lint gaps and say what lint cannot catch
firegiant9000 Nov 20, 2026
72de8fa
Hide a field pushed out of a parent that cannot scroll
firegiant9000 Nov 20, 2026
e8f4cd3
Treat transform, filter and contain parents as containing and clipping
firegiant9000 Nov 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ A local-only Firefox extension that records your job applications, what you sent
## The three claims

- **Local only.** All data stays on your machine. The extension makes no network requests.
- **Nothing reads a page until you click.** It has no content scripts. It reads the current tab only after you click the toolbar button or press Alt+Shift+S by default. The one thing that runs without a click is the local automatic backup check.
- **It never submits anything.** It does not fill forms, apply for jobs or send data anywhere.
- **Nothing reads or touches a page until you click.** It has no content scripts. It reads the current tab only after you click the toolbar button or press Alt+Shift+S by default, and it writes into a form only after you click Fill in the popup. The one thing that runs without a click is the local automatic backup check.
- **It fills only when you click, and never submits.** Fill writes your saved details into empty fields and nothing else. Countersign never clicks a button, presses a key or submits a form, and it sends no data anywhere.

## How the claims are enforced

Each claim is checked by the gate (`npm run gate`), which CI also runs.

| Claim | How it is enforced |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Local only | [`guard/build.test.ts`](guard/build.test.ts) scans every built `.js` and `.html` file for network APIs (`fetch`, `XMLHttpRequest`, `WebSocket`, `EventSource`, `sendBeacon`, `WebTransport`, `RTCPeerConnection`), checks that no built page loads a remote `src` or `href`, and asserts the manifest has no host permissions. [`eslint.config.js`](eslint.config.js) bans the same APIs in source (`no-restricted-globals`, `no-restricted-properties`, `no-restricted-syntax`). The Content Security Policy in [`wxt.config.ts`](wxt.config.ts) sets `default-src 'self'; ... connect-src 'none'`. |
| Nothing reads a page until you click | [`guard/build.test.ts`](guard/build.test.ts) asserts the built manifest declares no content scripts and no web-accessible resources. The permissions are listed below. The background event page runs only the local automatic backup check (on startup, install, a daily alarm and backup-counter changes) and never reads a tab ([`entrypoints/background.ts`](entrypoints/background.ts)). |
| It never submits anything | There is no code path that sends a request (see the first row), the manifest has no host access, and the CSP sets `form-action 'none'`, so a form on an extension page cannot post anywhere. The test asserts the exact CSP in the built manifest. |
| Claim | How it is enforced |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Local only | [`guard/build.test.ts`](guard/build.test.ts) scans every built `.js` and `.html` file for network APIs (`fetch`, `XMLHttpRequest`, `WebSocket`, `EventSource`, `sendBeacon`, `WebTransport`, `RTCPeerConnection`), checks that no built page loads a remote `src` or `href`, and asserts the manifest has no host permissions. [`eslint.config.js`](eslint.config.js) bans the same APIs in source (`no-restricted-globals`, `no-restricted-properties`, `no-restricted-syntax`). The Content Security Policy in [`wxt.config.ts`](wxt.config.ts) sets `default-src 'self'; ... connect-src 'none'`. |
| Nothing reads or touches a page until you click | [`guard/build.test.ts`](guard/build.test.ts) asserts the built manifest declares no content scripts and no web-accessible resources. The permissions are listed below. The background event page runs only the local automatic backup check (on startup, install, a daily alarm and backup-counter changes) and never reads a tab ([`entrypoints/background.ts`](entrypoints/background.ts)). The fill script is injected only by [`shell/fill/inject.ts`](shell/fill/inject.ts). Outside tests, lint rules in [`eslint.config.js`](eslint.config.js) check that only that file and `entrypoints/fill.ts` write the script's name or its hook's name as a literal, only [`shell/fill/controller.ts`](shell/fill/controller.ts) imports the injector, only `shell/ui/Popup.tsx` imports the controller (type imports are free), and only `shell/ui/FillSection.tsx` reads the controller's `fill()` (checked by literal property name). A controller test ([`shell/fill/controller.test.ts`](shell/fill/controller.test.ts)) shows that scanning never applies. The Fill button's click handler is the only caller of `fill()` ([`shell/ui/fill-section-source.test.ts`](shell/ui/fill-section-source.test.ts)). |
| It fills only when you click, and never submits | There is no code path that sends a request (see the first row), the manifest has no host access, and the CSP sets `form-action 'none'`, so a form on an extension page cannot post anywhere. The test asserts the exact CSP in the built manifest. For the fill script, a lint block in [`eslint.config.js`](eslint.config.js) covers `shell/fill/page/**` and `entrypoints/fill.ts`. It bans submit, requestSubmit, click, focus, blur, scrollIntoView and dispatchEvent, constructing events, console, storage, postMessage and cookie access, and the common ways of changing the page, such as creating, removing or moving elements, setting attributes, text, classes, styles or HTML, adding event listeners, resetting a form and `Object.assign`. That list is a denylist, so it is not a proof that no other change is possible. Only [`shell/fill/page/events.ts`](shell/fill/page/events.ts) may dispatch an event, and only a plain `input` or `change`. [`guard/build.test.ts`](guard/build.test.ts) scans the built `fill.js` for `submit`, `requestSubmit`, `click`, `KeyboardEvent`, `MouseEvent`, `PointerEvent` and `SubmitEvent`. A fixture test ([`shell/fill/page-apply.test.ts`](shell/fill/page-apply.test.ts)) fills a form and sees no submit, no new element and no new attribute. |

Files are saved only through [`shell/files/download.ts`](shell/files/download.ts), which builds a local `blob:` URL. A lint rule in [`eslint.config.js`](eslint.config.js) rejects any other use of `downloads`, and [`guard/source-rules.test.ts`](guard/source-rules.test.ts) tests that rule.

Expand All @@ -34,14 +34,15 @@ Stage 1 is the dashboard. Stage 2 adds saving a job from the page you are on, pl

- **Applications list** with search, filters, manual entry, and a next-action date and who acts next.
- **Save a job.** After you click the toolbar button (or press Alt+Shift+S by default; you can rebind it in about:addons), the popup reads the current tab once and offers the job for saving. Nothing is read before the click.
- **Fill a form.** In the popup, Fill writes your saved details and answers into the empty fields it recognises with certainty, then lists what it did not fill and why. It never changes a field that already has a value, and it never submits. Custom dropdowns and file uploads are listed for you to do yourself.
- **Duplicate and repost facts.** When a job matches an application you already have, the popup says so ("already applied" or "possible match"). It also states the fact when you saved the same posting earlier, without judging it.
- **Automatic backup.** Countersign saves `Countersign/countersign-backup.json` to your downloads folder, and the dashboard shows how old the last backup is. The backup file holds all your data, including your details and contacts, as plain text, so keep your downloads folder out of cloud sync if that matters to you.
- **What I told them.** Per application, record the answers you gave. A warning appears when one differs from your canonical answer.
- **Quiet list** (`#/quiet`) of applications with no response for a set number of days (a setting). You can close several at once.
- **Formhand log.** On an application, record the application site type and how filling went. You enter it by hand.
- **Fill log.** On an application, record the application site type and how filling went. You enter it by hand.
- **Contacts** (`#/contacts`) with a log of reaching out, replies and referrals. The popup and the application page ask "anyone here?" and let you record that you checked and nobody was there.
- **Deadlines** (`#/deadlines`): open tasks, next-action dates and quiet applications on one list, dated rows first.
- **My details** (`#/details`): 12 profile fields (name, email, phone, address, links) and your canonical answers, each with a copy button. Copying uses a click only, and nothing is typed into a page.
- **My details** (`#/details`): 14 profile fields (name, first and last name, email, phone, address, links) and your canonical answers, each with a copy button. Copying uses a click only.
- **Application detail** with a status history. Entries can be backdated, and a mistaken status can be undone without deleting history.
- **Resume and cover-letter records.** You attach a file to record which one you sent. Countersign stores the file name and a SHA-256 hash, not the file.
- **Canonical answers** (for example work authorisation or salary range), each with its history of earlier values.
Expand Down
51 changes: 51 additions & 0 deletions core/src/fill/compare.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { describe, expect, it } from 'vitest';
import { sameLink, samePhone, sameProfileValue, sameText } from './compare';

describe('sameText', () => {
it('ignores surrounding spaces and case', () => {
expect(sameText(' Sam ', 'sam')).toBe(true);
});

it('treats different words as different', () => {
expect(sameText('Sam', 'Samuel')).toBe(false);
});
});

describe('samePhone', () => {
it.each([
['+1 (555) 010-0142', '555 010 0142', true],
['555-010-0142', '5550100142', true],
['555-010-0142', '555-010-0143', false],
['0142', '10142', false],
['5550100142', '99995550100142', false],
['', '', false],
['abc', 'def', false],
])('samePhone(%j, %j) is %s', (a, b, expected) => {
expect(samePhone(a, b)).toBe(expected);
});
});

describe('sameLink', () => {
it.each([
['https://www.example.com/in/sam/', 'example.com/in/sam', true],
['HTTP://Example.com', 'example.com', true],
['example.com/a', 'example.com/b', false],
['https://example.com//', 'example.com', true],
])('sameLink(%j, %j) is %s', (a, b, expected) => {
expect(sameLink(a, b)).toBe(expected);
});
});

describe('sameProfileValue', () => {
it.each([
['phone', '+1 555 010 0142', '5550100142', true],
['website', 'https://example.com/', 'example.com', true],
['city', 'Springfield ', 'springfield', true],
['email', 'a@example.com', 'b@example.com', false],
] as const)(
'sameProfileValue(%j, %j, %j) is %s',
(key, formValue, own, expected) => {
expect(sameProfileValue(key, formValue, own)).toBe(expected);
},
);
});
52 changes: 52 additions & 0 deletions core/src/fill/compare.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import type { ProfileKey } from '../profile';

/** Trimmed, case-insensitive equality. */
export function sameText(a: string, b: string): boolean {
return a.trim().toLowerCase() === b.trim().toLowerCase();
}

/**
* Equal digit strings match, as does a shorter number (at least 7 digits)
* that is the tail of a longer one with 1 to 3 extra leading digits.
*/
export function samePhone(a: string, b: string): boolean {
const digitsA = a.replace(/\D/g, '');
const digitsB = b.replace(/\D/g, '');
if (digitsA === digitsB) {
return digitsA !== '';
}
const [short, long] =
digitsA.length <= digitsB.length ? [digitsA, digitsB] : [digitsB, digitsA];
const extra = long.length - short.length;
return short.length >= 7 && long.endsWith(short) && extra >= 1 && extra <= 3;
}

function normalizeLink(value: string): string {
let link = value.trim().toLowerCase();
link = link.replace(/^https?:\/\//, '');
link = link.replace(/^www\./, '');
return link.replace(/\/+$/, '');
}

/** Compares URLs or domains, ignoring scheme, leading www. and trailing slashes. */
export function sameLink(a: string, b: string): boolean {
return normalizeLink(a) === normalizeLink(b);
}

/** Picks the comparison rule for a saved profile key. */
export function sameProfileValue(
key: ProfileKey,
formValue: string,
own: string,
): boolean {
switch (key) {
case 'phone':
return samePhone(formValue, own);
case 'linkedin':
case 'github':
case 'website':
return sameLink(formValue, own);
default:
return sameText(formValue, own);
}
}
Loading