Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Retire "Share with extension" feature and remove browser extension integration code

Open
#1,072 0 comments 0 reactions 0 assignees View on GitHub

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

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

chore gaal refactor

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:

  1. Deleting the ShareWithExtensionBar UI component, its presence-probe hook, and unmounting it from / (src/App.tsx).
  2. Deleting the extension communication protocol and test utilities (extension-profile.ts, __test-utils__/extension-channel.ts).
  3. Deleting the watched-companies extension bridge (watched-companies-bridge.ts, useWatchedCompaniesBridge.ts) and unmounting it from /jobs/ (src/jobs/JobsApp.tsx).
  4. Cleaning up extension-only storage layer accommodations (getExistingDB() and the ...FromExisting/...IntoExisting wrappers across src/lib/storage/).
  5. Updating @offlinecv/core re-exports in packages/core/src/index.ts to expose standard storage functions directly.
  6. 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. Calls shareResumeProfile / 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 pings recruidea-extension on window.postMessage on mount (with a 1s retry) and latches present = true on 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 when state.phase === "done".
  • src/App.test.tsx: Lines 178–181 (mock of ShareWithExtensionBar).
  • src/App.add-stage.test.tsx: Lines 130–133 (mock of ShareWithExtensionBar).
  • src/App.library-identity.test.tsx: Lines 164–167 (mock of ShareWithExtensionBar).
3. Extension Profile Channel & Test Harness
  • src/lib/extension-profile.ts (338 LOC): Implements recruidea-extension protocol over window.postMessage. Defines buildSharedResumeProfile, shareResumeProfile, clearSharedResumeProfile, postExtensionPing, onExtensionPong, and origin verification helper isFromThisPage.
  • 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 providing dispatchFromExtension() for jsdom tests.
4. Watched-Companies Extension Bridge
  • src/lib/watched-companies-bridge.ts (117 LOC): Always-listening responder on window answering get-watched-companies on recruidea-extension channel by querying IndexedDB watched store.
  • src/lib/watched-companies-bridge.test.ts (188 LOC): Unit test suite for the watched companies responder.
  • src/hooks/useWatchedCompaniesBridge.ts (19 LOC): Hook mounting listenForWatchedCompaniesRequests() 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.
5. Storage Layer: Content-Script Accommodations
  • src/lib/storage/db.ts:
    • Lines 43–48: Comment warning about extension/offlinecv-pin.json and getExistingDB.
    • Lines 148–219: getExistingDB() and openExisting() fallback logic added in PR #869 for content-script callers.
    • Lines 220–228: closeDB() clearing existingDbPromise.
  • 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 for getExistingDB).
  • packages/core/src/index.ts: Lines 256–285 (re-exports of ...FromExisting/...IntoExisting wrappers as getRecord, 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
  1. Delete src/components/features/ShareWithExtensionBar.tsx.
  2. Delete src/components/features/ShareWithExtensionBar.test.tsx.
  3. Delete src/hooks/useExtensionPresence.ts.
Step 2: Unmount from src/App.tsx and Clean App Tests
  1. 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.
  2. In src/App.test.tsx:
    • Remove vi.mock("./components/features/ShareWithExtensionBar.tsx", ...) block (lines 178–181).
  3. In src/App.add-stage.test.tsx:
    • Remove vi.mock("./components/features/ShareWithExtensionBar.tsx", ...) block (lines 130–133).
  4. In src/App.library-identity.test.tsx:
    • Remove vi.mock("./components/features/ShareWithExtensionBar.tsx", ...) block (lines 164–167).
Step 3: Remove Extension Channel Protocol & Utilities
  1. Delete src/lib/extension-profile.ts.
  2. Delete src/lib/extension-profile.test.ts.
  3. Delete src/lib/__test-utils__/extension-channel.ts.
  4. 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.
Step 4: Remove Watched Companies Extension Bridge
  1. Delete src/lib/watched-companies-bridge.ts.
  2. Delete src/lib/watched-companies-bridge.test.ts.
  3. Delete src/hooks/useWatchedCompaniesBridge.ts.
  4. In src/jobs/JobsApp.tsx:
    • Remove import { useWatchedCompaniesBridge } from "../hooks/useWatchedCompaniesBridge.ts";
    • Remove useWatchedCompaniesBridge(); call and comments (lines 66–68).
Step 5: Clean Up Content-Script Storage Accommodations
  1. In src/lib/storage/db.ts:
    • Remove getExistingDB() and openExisting().
    • Remove existingDbPromise variable and its reset in closeDB().
    • Remove docblock warnings about extension/offlinecv-pin.json and content-script version upgrades.
  2. 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 *FromExisting and *IntoExisting function exports.
    • Simplify private ...Via helper implementations where only the standard getDB opener remains.
  3. In src/lib/storage/db.test.ts:
    • Remove getExistingDB tests and unused imports.
  4. In packages/core/src/index.ts:
    • Update re-exports of getRecord, putRecord, deleteRecord, listRecordsUpdatedSince to import directly from crud.ts.
    • Update re-exports of getSyncCursor, setSyncCursor to import directly from sync-cursor.ts.
    • Update module docblock comments explaining the removal of content-script rebinding.
Step 6: Repo Configuration and Cleanup
  1. In .gitignore: Remove lines 78–81 (extension/).
  2. In eslint.config.js: Remove line 132 ("extension/**").
  3. Close issue #870 referencing this retirement.

Acceptance Criteria

  • ShareWithExtensionBar.tsx, ShareWithExtensionBar.test.tsx, and useExtensionPresence.ts are deleted.
  • src/App.tsx has no references to ShareWithExtensionBar and renders cleanly with no visual regression in the "done" phase.
  • src/App.test.tsx, src/App.add-stage.test.tsx, and src/App.library-identity.test.tsx have all ShareWithExtensionBar mocks removed and pass cleanly.
  • src/lib/extension-profile.ts, src/lib/extension-profile.test.ts, and src/lib/__test-utils__/extension-channel.ts are deleted.
  • src/lib/watched-companies-bridge.ts, src/lib/watched-companies-bridge.test.ts, and src/hooks/useWatchedCompaniesBridge.ts are deleted.
  • src/jobs/JobsApp.tsx has no references to useWatchedCompaniesBridge and continues to support the in-app company watchlist (useCompanyTargets) cleanly.
  • getExistingDB() and all ...FromExisting/...IntoExisting wrappers are removed from src/lib/storage/.
  • packages/core/src/index.ts re-exports standard CRUD/sync functions directly and npm run check:core passes with all exported symbols intact.
  • .gitignore and eslint.config.js no longer reference extension/.
  • Full quality gates pass cleanly: npm run typecheck, npm run lint, npm run test, npm run check:core, and npm 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from offlinecv/OfflineCV

All issues in offlinecv/OfflineCV

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.