Skip to content

Gate Bluetooth and USB transports independently#34

Open
fmartingr wants to merge 2 commits into
transcriptionstream:masterfrom
fmartingr:feature-gate-usb-bt-separately
Open

Gate Bluetooth and USB transports independently#34
fmartingr wants to merge 2 commits into
transcriptionstream:masterfrom
fmartingr:feature-gate-usb-bt-separately

Conversation

@fmartingr

Copy link
Copy Markdown

Previously the compatibility check disabled all printing when Web Bluetooth was missing, even if WebUSB was available. Browsers that ship only one of the two device APIs (e.g. privacy-focused Chromium forks) couldn't reach the working transport.

Changes:

  • checkCompatibility() now keeps state.canPrint true when at least one transport is available, and warns about each missing one individually instead of blocking everything.
  • The connection-type options are now disabled (with a tooltip) when their transport is unavailable, instead of one being silently removed. Same treatment for the mobile select. When Bluetooth is missing but USB is present, the default connection type flips to 'usb' and both selects update to match. The Connect button's no-transport alert now fires only when truly no path is available, and recommends a Chromium-based browser. User-facing copy across app.js, index.html and usb.js drops the 'Web Bluetooth' / 'WebUSB' / 'API' jargon in favour of plain 'Bluetooth printing' / 'USB printing'. README: new 'USB on Linux' section covering the usblp kernel driver claim-interface error and three fix paths (modprobe -r, blacklist, per-device udev rule), plus a note on the generic 'USB Composite Device' productName triggering the manual model picker.

fmartingr added 2 commits May 23, 2026 08:33
Previously the compatibility check disabled all printing when Web
Bluetooth was missing, even if WebUSB was available. Browsers that
ship only one of the two device APIs (e.g. privacy-focused Chromium
forks) couldn't reach the working transport.

Changes:
- checkCompatibility() now keeps state.canPrint true when at least
  one transport is available, and warns about each missing one
  individually instead of blocking everything.
- The connection-type <select> options are now *disabled* (with a
  tooltip) when their transport is unavailable, instead of one being
  silently removed. Same treatment for the mobile select.
- When Bluetooth is missing but USB is present, the default
  connection type flips to 'usb' and both selects update to match.
- The Connect button's no-transport alert now fires only when truly
  no path is available, and recommends a Chromium-based browser.
- User-facing copy across app.js, index.html and usb.js drops the
  'Web Bluetooth' / 'WebUSB' / 'API' jargon in favour of plain
  'Bluetooth printing' / 'USB printing'.
- README: new 'USB on Linux' section covering the usblp kernel
  driver claim-interface error and three fix paths (modprobe -r,
  blacklist, per-device udev rule), plus a note on the generic
  'USB Composite Device' productName triggering the manual model
  picker.
Brings in 17 commits including:
- M04/M04S/M04AS protocol support (300 DPI, real-hardware tested)
- Data-driven printer definitions with user-customizable manager
- Continuous tape support for D-series; round-label rendering fix
- Integer-pixel barcode rendering for crisp output
- Clipboard image paste (Ctrl/Cmd+V)
- Quick-start info dialog, Playwright tests, user manual
- Donation links and README rewrite for clarity

Conflict resolution:
- README.md: took upstream's restructured version (shorter, table-
  based supported printers, mobile screenshot). Re-inserted the
  'USB on Linux' section after 'Connection Tips' since it's
  net-new content not present upstream.
- src/web/index.html: took upstream's connect-dialog footer
  (already includes a 'Requires Chrome, Edge, or Chromium' note
  in the new donate-row layout); dropped the duplicate browser
  note that this branch added.
- src/web/app.js: auto-merged. Verified our transport-gating
  helpers (disableUnsupportedConnOptions, decoupled canPrint,
  plain-language warnings) all survived intact alongside upstream's
  clipboard-paste and printer-manager additions.
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.

1 participant