Retire "Share with extension" feature and remove browser extension integration code
I maintainer di solito rispondono entro 1 giorno
@s-annam ci sta già lavorando.
Dal 29/9/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- build-system, database, frontend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 11
- Fork
- 4
- Merge medio
- 17h 57m
- PR unite (30g)
- 99
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di offlinecv/OfflineCV
-
documentation needs-clarification
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
offlinecv/OfflineCV#946 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[parser] Investigate two #811-lane residues: 3-part trailing location cell and empty-title fixturesApertabug gaal ready-for-agent ux:parsing
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
-
pr-review: fail the job when the reviewer posts no review for the head SHA, and keep its transcriptApertabug github_actions ready-for-agent
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
offlinecv/OfflineCV#1119 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug github_actions ready-for-agent
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
offlinecv/OfflineCV#1118 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di offlinecv/OfflineCV
Issue simili
-
bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pingdotgg/t3code#14452 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
solana-foundation/program-examples#747 · 1 commento ·
I maintainer di solito rispondono entro 9 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
remotion-dev/remotion#11847 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
openwatersio/slackwater#355 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
melgarafael/DeskcommCRM#1998 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno