Skip to content

Portal backend api#151

Draft
iinuwa wants to merge 37 commits intoportal-apifrom
portal-backend-api
Draft

Portal backend api#151
iinuwa wants to merge 37 commits intoportal-apifrom
portal-backend-api

Conversation

@iinuwa
Copy link
Copy Markdown
Member

@iinuwa iinuwa commented Apr 25, 2026

Add implementation of portal backend API.

This is a work-in-progress as the spec evolves

Depends on #148

phelix001 and others added 30 commits February 16, 2026 16:41
Port the Firefox web extension to Edge/Chromium (MV3, Chrome 111+).

Key architectural differences from Firefox version:
- Two content scripts: MAIN world (overrides navigator.credentials)
  and ISOLATED world (bridges to background via chrome.runtime)
- window.postMessage bridge between MAIN and ISOLATED worlds
  (Firefox uses exportFunction/cloneInto which don't exist in Chromium)
- Base64url encoding via btoa/atob helpers instead of
  Uint8Array.toBase64/fromBase64 (not available in Chromium)
- Service worker background script instead of persistent background page
- chrome.* namespace instead of browser.*

New files:
- webext/add-on-edge/ - Complete Edge/Chromium extension
- webext/app/credential_manager_shim_edge.json.in - Native messaging
  manifest template for Chromium-based browsers

Updated README with Edge/Chromium setup instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address PR review feedback to eliminate code duplication between
webext/add-on/ (Firefox) and webext/add-on-edge/ (Chromium).

Key changes:
- Unified architecture: both browsers now use MAIN + ISOLATED world
  content scripts with window.postMessage bridge, eliminating the
  need for Firefox-specific cloneInto()/exportFunction() APIs
- Use native Uint8Array.toBase64()/fromBase64() for base64url
  encoding/decoding (supported in both Firefox 140+ and Chrome 111+)
- Simplified background.js: ArrayBuffer serialization now happens in
  content-main.js, so background just forwards messages
- Browser-specific manifests: manifest.firefox.json (background
  scripts) and manifest.chromium.json (service worker)
- Browser API detection via globalThis.browser || globalThis.chrome
  in content-bridge.js and background.js

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update README to document Edge/Chromium support alongside Firefox
- Fix webext/README references to deleted add-on-edge/ directory
- Add manifest.json copy step for both Firefox and Chromium dev workflows
- Add webext/add-on/manifest.json to .gitignore (generated for local dev)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Revert Firefox content_scripts matches from <all_urls> back to
  restricted URL list to avoid triggering extra Firefox store review
- Apply reviewer's meson.build suggestions: rename shared file list,
  update Firefox target to use cp/mv pattern, add full Chromium
  build target

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch Firefox from background.scripts to background.service_worker
to match the Chromium manifest, per reviewer feedback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
po: Add Georgian language support
feat: add Edge/Chromium browser extension support
This will be a replacement of the FlowController trait. We temporarily
need two different implementations of dyn-compatible trait, but in order
to make an async fn, we use a struct that forwards over a channel.
@iinuwa iinuwa changed the base branch from main to portal-api April 25, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants