Skip to content

Accessibility, UX polish, and build tooling improvements (13 items)#34

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/featureaccessibility-ux-improvements
Draft

Accessibility, UX polish, and build tooling improvements (13 items)#34
Copilot wants to merge 2 commits intomainfrom
copilot/featureaccessibility-ux-improvements

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 13, 2026

Addresses 13 medium-priority issues spanning accessibility gaps, UX inconsistencies, and build tooling gaps across the extension.

Accessibility

  • Touch support in selection overlay — adds touchstart/touchmove/touchend handlers (with { passive: false }) mirroring the mouse flow; cleanup removes them properly
  • Keyboard-navigable asset gridAssetThumbnail gets role="button", tabIndex={0}, Enter/Space onKeyDown handler, and a descriptive aria-label with human-readable status ("ready to upload" not "draft")

UX Polish

  • Forgot Password flow — "Forgot Password?" button (login mode only) calls numbersApi.auth.resetPassword({ email }); shows inline success/error feedback
  • Real XHR upload progress — replaces the fake setInterval progress simulation with XMLHttpRequest.upload.onprogress for actual byte-level progress; added getBaseUrl() to ApiClient to avoid accessing private state
  • Restricted tab guard — pre-checks tab.url against chrome://, chrome-extension://, Web Store, about:, edge:// before captureVisibleTab, surfacing a user-friendly error instead of a cryptic Chrome API throw
  • Watermark output formatWatermarkPayload gains outputFormat/outputQuality; toDataURL() now uses the user's chosen format (png/jpeg/webp) instead of always emitting PNG
  • Offscreen operation timeout — both ADD_WATERMARK call sites wrapped in Promise.race with a 30 s deadline

Code Quality

  • Canvas state isolationdrawTimestamp and drawLogo wrapped in ctx.save()/ctx.restore() to prevent globalAlpha leakage between operations
  • Share page → React — replaces innerHTML string injection with a proper useState/useEffect React component, consistent with popup/options
  • Inline style extractionAssetThumbnail (website row, status group, hunt buttons) and SharePromptModal inline styles moved to named CSS classes in popup.css
  • createSignedMetadatacreateMetadataPayload — name now reflects reality (JSON serialization, no signing)

Build Tooling

  • Source mapsvite.config.ts gets sourcemap: 'hidden'; scripts/package.js excludes *.map from the extension zip via --exclude "*.map"
  • Version sync guard — new scripts/validate-version.js asserts package.json and manifest.template.json carry the same version; wired as prebuild so it gates every npm run build
Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature][Medium] Accessibility, UX polish, and build tooling improvements</issue_title>
<issue_description>## Summary

13 medium-priority improvements spanning accessibility, UX consistency, and build tooling.

Findings

Accessibility

  1. No touch event support in selection overlaysrc/content/selection-overlay.ts lines 88-91. Only binds mouse events; touch-screen Chromebook/tablet users cannot use selection capture. Add touchstart/touchmove/touchend handlers.

  2. No keyboard navigation for popup asset gridsrc/popup/popup.tsx lines 538-768. Asset grid items are <div> with onClick but no tabIndex, role, or keyboard handlers. Add role="button", tabIndex={0}, onKeyDown (Enter/Space), and aria-label for WCAG 2.1 compliance.

UX Polish

  1. No password reset flow in AuthFormsrc/popup/AuthForm.tsx. AuthService.resetPassword() exists (line 154) but no "Forgot Password?" link in the UI. Add link that calls the existing API method.

  2. Simulated upload progress is misleadingsrc/services/UploadService.ts lines 284-297. Progress increments at fixed 500ms intervals regardless of actual upload speed. Use XMLHttpRequest.upload.onprogress for real progress reporting.

  3. No graceful handling of restricted tab URLssrc/background/service-worker.ts lines 428-431. captureVisibleTab throws on chrome://, Web Store, etc. with cryptic errors. Pre-check tab.url against restricted patterns and show user-friendly message.

  4. Watermark always outputs PNGsrc/offscreen/offscreen.ts line 166. canvas.toDataURL('image/png') ignores user's format setting. Pass format/quality to offscreen message and use in toDataURL().

  5. No timeout for offscreen document operationssrc/background/service-worker.ts lines 241-262. Offscreen message calls have no timeout. Wrap in Promise.race with 30s timeout.

Code Quality

  1. Canvas state reuse without save/restoresrc/offscreen/offscreen.ts lines 126-167. No ctx.save()/ctx.restore() around drawing operations. Failed logo draw leaves canvas with globalAlpha=0.7.

  2. Share page uses raw DOM despite .tsxsrc/share/share.tsx. Uses innerHTML instead of React, inconsistent with popup/options pages. Convert to React component.

  3. Excessive inline styles in popupsrc/popup/popup.tsx (CaptureSection, AssetThumbnail, SharePromptModal). ~80+ lines of inline styles. Extract to CSS classes in popup.css.

  4. createSignedMetadata doesn't signsrc/services/UploadService.ts lines 449-471. Method name implies cryptographic signing but only serializes JSON. Rename to createMetadataPayload.

Build Tooling

  1. No source map controlsvite.config.ts. No build.sourcemap config. Add sourcemap: 'hidden' and exclude .map from package zip.

  2. Version in two places with no sync validationmanifest.template.json line 4, package.json line 3. Add pre-build validation step or make package.json the single source of truth.

Labels

enhancement, priority:medium</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

- Add touch event support in selection overlay (issue #1)
- Add keyboard navigation/ARIA for asset grid (issue #2)
- Add Forgot Password flow in AuthForm (issue #3)
- Replace simulated progress with XHR real progress (issue #4)
- Add restricted tab URL check before captureVisibleTab (issue #5)
- Pass output format/quality to offscreen watermark (issue #6)
- Add 30s timeout for offscreen operations (issue #7)
- Add ctx.save()/ctx.restore() around canvas drawing (issue #8)
- Convert share page from raw DOM to React (issue #9)
- Extract inline styles to CSS classes (issue #10)
- Rename createSignedMetadata to createMetadataPayload (issue #11)
- Add sourcemap: 'hidden' to vite.config.ts (issue #12)
- Add pre-build version sync validation (issue #13)

Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot AI changed the title [WIP] [Feature] Implement accessibility and UX improvements Accessibility, UX polish, and build tooling improvements (13 items) Mar 13, 2026
Copilot AI requested a review from numbers-official March 13, 2026 22:46
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.

[Feature][Medium] Accessibility, UX polish, and build tooling improvements

2 participants