Retire "Share with extension" feature and remove browser extension integration code
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- build-system, database, frontend
Research direction
Start with the listed extension components, hooks, bridge files, storage modules, and their tests, then trace references from src/App.tsx, src/jobs/JobsApp.tsx, and packages/core/src/index.ts. Run the named quality gates after removing the extension integrations and storage wrappers; done means no extension references remain, core exports stay intact, and all checks pass.
Written by the indexing model from the issue text.
Description
Summary
The Share with extension feature and all associated browser-extension-specific integration code are no longer supported for offlinecv and should be cleanly retired from the repository.
Extension support was introduced across several PRs (notably #785 for ShareWithExtensionBar and extension-profile.ts, #897 for watched-companies-bridge.ts, and #869 for content-script storage accommodations). Because offlinecv is a standalone, client-side web application focused on privacy and local processing, maintaining extension-specific affordances, ambient message bridges on window, content-script IndexedDB workarounds (getExistingDB), and cross-repo version synchronizations (extension/offlinecv-pin.json warnings documented in #870) creates ongoing cognitive and maintenance debt with no product value.
Retiring this feature involves:
- Deleting the
ShareWithExtensionBarUI component, its presence-probe hook, and unmounting it from/(src/App.tsx). - Deleting the extension communication protocol and test utilities (
extension-profile.ts,__test-utils__/extension-channel.ts). - Deleting the watched-companies extension bridge (
watched-companies-bridge.ts,useWatchedCompaniesBridge.ts) and unmounting it from/jobs/(src/jobs/JobsApp.tsx). - Cleaning up extension-only storage layer accommodations (
getExistingDB()and the...FromExisting/...IntoExistingwrappers acrosssrc/lib/storage/). - Updating
@offlinecv/corere-exports inpackages/core/src/index.tsto expose standard storage functions directly. - Cleaning up repo configurations (
.gitignore,eslint.config.js) and docblocks referencing the extension.
Affected Files and Current Architecture
1. User-Facing Feature & Hook
src/components/features/ShareWithExtensionBar.tsx(179 LOC): Renders the secondary action bar on/with "Share with extension" and "Stop sharing" buttons. CallsshareResumeProfile/clearSharedResumeProfile.src/components/features/ShareWithExtensionBar.test.tsx(139 LOC): Unit tests for the bar and its response states (stored,refused,cleared,no-reply).src/hooks/useExtensionPresence.ts(58 LOC): Hook that pingsrecruidea-extensiononwindow.postMessageon mount (with a 1s retry) and latchespresent = trueon pong.
2. Main Page Mounting & Test Mocks
src/App.tsx:- Line 19:
import { ShareWithExtensionBar } from "./components/features/ShareWithExtensionBar.tsx"; - Lines 695–707:
<ShareWithExtensionBar parsed={recovery.activeResult.canonical.fields} fileName={state.fileName} />rendered conditionally whenstate.phase === "done".
- Line 19:
src/App.test.tsx: Lines 178–181 (mock ofShareWithExtensionBar).src/App.add-stage.test.tsx: Lines 130–133 (mock ofShareWithExtensionBar).src/App.library-identity.test.tsx: Lines 164–167 (mock ofShareWithExtensionBar).
3. Extension Profile Channel & Test Harness
src/lib/extension-profile.ts(338 LOC): Implementsrecruidea-extensionprotocol overwindow.postMessage. DefinesbuildSharedResumeProfile,shareResumeProfile,clearSharedResumeProfile,postExtensionPing,onExtensionPong, and origin verification helperisFromThisPage.src/lib/extension-profile.test.ts(340 LOC): Unit test suite for the extension profile channel.src/lib/__test-utils__/extension-channel.ts(60 LOC): Test helper providingdispatchFromExtension()for jsdom tests.
4. Watched-Companies Extension Bridge
src/lib/watched-companies-bridge.ts(117 LOC): Always-listening responder onwindowansweringget-watched-companiesonrecruidea-extensionchannel by querying IndexedDBwatchedstore.src/lib/watched-companies-bridge.test.ts(188 LOC): Unit test suite for the watched companies responder.src/hooks/useWatchedCompaniesBridge.ts(19 LOC): Hook mountinglistenForWatchedCompaniesRequests()for the lifetime of/jobs/.src/jobs/JobsApp.tsx:- Line 50:
import { useWatchedCompaniesBridge } from "../hooks/useWatchedCompaniesBridge.ts"; - Lines 66–68:
useWatchedCompaniesBridge();called at the top of the component.
- Line 50:
5. Storage Layer: Content-Script Accommodations
src/lib/storage/db.ts:- Lines 43–48: Comment warning about
extension/offlinecv-pin.jsonandgetExistingDB. - Lines 148–219:
getExistingDB()andopenExisting()fallback logic added in PR #869 for content-script callers. - Lines 220–228:
closeDB()clearingexistingDbPromise.
- Lines 43–48: Comment warning about
src/lib/storage/capture.ts: Lines 111–120 (captureJobIntoExisting).src/lib/storage/crud.ts: Lines 160–169 (putRecordIntoExisting), 215–223 (getRecordFromExisting), 248–256 (getAllRecordsFromExisting), 299–311 (listRecordsUpdatedSinceFromExisting), 363–372 (deleteRecordFromExisting).src/lib/storage/jobs.ts: Lines 34–47 (saveJobIntoExisting), 79–90 (getJobFromExisting).src/lib/storage/resumes.ts: Lines 47–54 (getAllResumesFromExisting), 79–84 (listResumeChoicesFromExisting).src/lib/storage/sync-cursor.ts: Lines 46–54 (getSyncCursorFromExisting), 76–84 (setSyncCursorIntoExisting).src/lib/storage/db.test.ts: Lines 5, 20, 29–89 (test cases forgetExistingDB).packages/core/src/index.ts: Lines 256–285 (re-exports of...FromExisting/...IntoExistingwrappers asgetRecord,putRecord,deleteRecord,listRecordsUpdatedSince,getSyncCursor,setSyncCursor).
6. Repository Configuration & Docs
.gitignore: Lines 78–81 (extension/entry).eslint.config.js: Line 132 ("extension/**"in ignores).- Issue #870: Can be closed as superseded once extension-related code is removed.
Step-by-Step Implementation Plan
Step 1: Remove User-Facing Feature & Hook
- Delete
src/components/features/ShareWithExtensionBar.tsx. - Delete
src/components/features/ShareWithExtensionBar.test.tsx. - Delete
src/hooks/useExtensionPresence.ts.
Step 2: Unmount from src/App.tsx and Clean App Tests
- In
src/App.tsx:- Remove
import { ShareWithExtensionBar } from "./components/features/ShareWithExtensionBar.tsx"; - Remove
<ShareWithExtensionBar parsed={recovery.activeResult.canonical.fields} fileName={state.fileName} />and surrounding comments around line 695–707.
- Remove
- In
src/App.test.tsx:- Remove
vi.mock("./components/features/ShareWithExtensionBar.tsx", ...)block (lines 178–181).
- Remove
- In
src/App.add-stage.test.tsx:- Remove
vi.mock("./components/features/ShareWithExtensionBar.tsx", ...)block (lines 130–133).
- Remove
- In
src/App.library-identity.test.tsx:- Remove
vi.mock("./components/features/ShareWithExtensionBar.tsx", ...)block (lines 164–167).
- Remove
Step 3: Remove Extension Channel Protocol & Utilities
- Delete
src/lib/extension-profile.ts. - Delete
src/lib/extension-profile.test.ts. - Delete
src/lib/__test-utils__/extension-channel.ts. - In
src/lib/job-origin-reach.test.ts:- Clean up comment mentioning
lib/extension-profile.ts(lines 66–73). Note: the test text scan itself continues to pass.
- Clean up comment mentioning
Step 4: Remove Watched Companies Extension Bridge
- Delete
src/lib/watched-companies-bridge.ts. - Delete
src/lib/watched-companies-bridge.test.ts. - Delete
src/hooks/useWatchedCompaniesBridge.ts. - In
src/jobs/JobsApp.tsx:- Remove
import { useWatchedCompaniesBridge } from "../hooks/useWatchedCompaniesBridge.ts"; - Remove
useWatchedCompaniesBridge();call and comments (lines 66–68).
- Remove
Step 5: Clean Up Content-Script Storage Accommodations
- In
src/lib/storage/db.ts:- Remove
getExistingDB()andopenExisting(). - Remove
existingDbPromisevariable and its reset incloseDB(). - Remove docblock warnings about
extension/offlinecv-pin.jsonand content-script version upgrades.
- Remove
- In
src/lib/storage/crud.ts,src/lib/storage/jobs.ts,src/lib/storage/resumes.ts,src/lib/storage/sync-cursor.ts,src/lib/storage/capture.ts:- Remove all
*FromExistingand*IntoExistingfunction exports. - Simplify private
...Viahelper implementations where only the standardgetDBopener remains.
- Remove all
- In
src/lib/storage/db.test.ts:- Remove
getExistingDBtests and unused imports.
- Remove
- In
packages/core/src/index.ts:- Update re-exports of
getRecord,putRecord,deleteRecord,listRecordsUpdatedSinceto import directly fromcrud.ts. - Update re-exports of
getSyncCursor,setSyncCursorto import directly fromsync-cursor.ts. - Update module docblock comments explaining the removal of content-script rebinding.
- Update re-exports of
Step 6: Repo Configuration and Cleanup
- In
.gitignore: Remove lines 78–81 (extension/). - In
eslint.config.js: Remove line 132 ("extension/**"). - Close issue #870 referencing this retirement.
Acceptance Criteria
-
ShareWithExtensionBar.tsx,ShareWithExtensionBar.test.tsx, anduseExtensionPresence.tsare deleted. -
src/App.tsxhas no references toShareWithExtensionBarand renders cleanly with no visual regression in the"done"phase. -
src/App.test.tsx,src/App.add-stage.test.tsx, andsrc/App.library-identity.test.tsxhave allShareWithExtensionBarmocks removed and pass cleanly. -
src/lib/extension-profile.ts,src/lib/extension-profile.test.ts, andsrc/lib/__test-utils__/extension-channel.tsare deleted. -
src/lib/watched-companies-bridge.ts,src/lib/watched-companies-bridge.test.ts, andsrc/hooks/useWatchedCompaniesBridge.tsare deleted. -
src/jobs/JobsApp.tsxhas no references touseWatchedCompaniesBridgeand continues to support the in-app company watchlist (useCompanyTargets) cleanly. -
getExistingDB()and all...FromExisting/...IntoExistingwrappers are removed fromsrc/lib/storage/. -
packages/core/src/index.tsre-exports standard CRUD/sync functions directly andnpm run check:corepasses with all exported symbols intact. -
.gitignoreandeslint.config.jsno longer referenceextension/. - Full quality gates pass cleanly:
npm run typecheck,npm run lint,npm run test,npm run check:core, andnpm run build. - Issue #870 is closed as superseded.
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 4
- Avg merge
- 1d 24m
- Merged PRs (30d)
- 71
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from offlinecv/OfflineCV
-
chore gaal
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Download PDF: preview the exact exported PDF, all pages, before saving itPossibly taken @s-annam claimed this today. Openfeature gaal ready-for-agent ux:edit-export
offlinecv/OfflineCV#1077 · 1 assignee ·
Maintainers usually reply within 1 day
-
Render marker-only parsed lines in "Other bullets" read-only instead of offering refused actionsOpengaal improvement ready-for-agent ux:edit-export
Difficulty 3/5 1-2 days Newbie friendliness 88/100
offlinecv/OfflineCV#1052 · 1 comment ·
Maintainers usually reply within 1 day
All issues in offlinecv/OfflineCV
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/vscode-livepreview#876 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 90/100
JustJarethB/invoicer#54 ·
-
ICP 1.2.0 shows a scheduled task's interval in milliseconds under the label "Interval (In seconds)"OpenNeeds Triage Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/product-integrator#2585 ·
Maintainers usually reply within 1 day
-
check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
design
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MTES-MCT/monitor-field#119 ·
Maintainers usually reply within 1 day