Commit Graph

9 Commits

Author SHA1 Message Date
Forge
8d3887a0af fix: use execCommand insertText for contenteditable replace - fixes delete-without-paste bug
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 43s
2026-03-06 14:44:05 +08:00
Forge
ec98bac146 fix: capture selection on toolbar button mousedown - definitive replace fix
Some checks failed
CI — Test & Build / Test & Build (push) Has been cancelled
Root cause (dual bugs):
1. SCOPE BUG: snapStart/snapEnd/snapElement/snapRange were local vars inside
   runAction() but showModal() is a sibling function — those snap vars were
   never in scope inside the Replace button handler. The condition always
   silently fell through, doing nothing.

2. TIMING BUG: Selection was only captured on document mouseup, which could
   race against focus changes when clicking the toolbar.

Fix:
- showModal() now accepts snapStart/snapEnd/snapElement/snapRange as explicit
  parameters — guaranteed in-scope, no closure ambiguity
- Each toolbar button mousedown calls captureForButton() BEFORE any focus
  shift can occur (belt-and-suspenders, works even if e.preventDefault fails)
- Added console.log debug lines to Replace handler and runAction snapshot
- selectionLocked reset on Escape and overlay click (was missing)
2026-03-06 14:36:48 +08:00
Forge
1936d6a7b5 fix: lock stored selection during modal - prevents mouseup from resetting on Replace click
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 44s
2026-03-06 14:15:41 +08:00
Forge
a0b00c6d87 fix: comprehensive extension context invalidated handling
Some checks failed
CI — Test & Build / Test & Build (push) Has been cancelled
2026-03-06 13:56:30 +08:00
Forge
e34f4aba4b fix: handle extension context invalidated error gracefully 2026-03-06 13:43:57 +08:00
Forge
b54cfc87cf feat: auto-show toolbar on text selection, position above selection 2026-03-06 13:40:50 +08:00
Forge
aa75e8d8ac fix: replace clears text field - store selection before toolbar shows
Some checks failed
CI — Test & Build / Test & Build (push) Has been cancelled
2026-03-06 13:38:13 +08:00
Forge
c35ef08531 feat: fix WXT setup — install @wxt-dev/module-react, fix sandbox imports, clean build (closes #1)
Some checks failed
CI — Test & Build / Unit Tests (push) Failing after 34s
CI — Test & Build / Build Extension (push) Has been skipped
2026-03-06 13:11:19 +08:00
Nemo
b04076081c feat: initial LexAI Chrome extension scaffold
Some checks failed
CI — Test & Build / Unit Tests (push) Failing after 54s
CI — Test & Build / Build Extension (push) Has been skipped
- WXT + React 18 + TypeScript setup
- Background service worker (LLM API proxy)
- Content script (floating toolbar + text selection)
- Options page (provider/model/API key config)
- Popup UI
- Gitea Actions workflows (CI, preview, release)
- Vitest unit tests + Playwright E2E setup
- Supports: OpenAI, Anthropic, Groq, OpenRouter
2026-03-06 09:34:15 +08:00