How andyxueanan-dot/codex-highlighter works
Codex Highlighter is a Windows companion for persistent, locally stored highlights in Codex conversations. The primary workflow is selecting transcript text, choosing a color, and later seeing the highlight re-anchored as the page changes. A native launcher enables loopback CDP and injects the renderer script; a background monitor synchronizes data to disk. Tray data management supports search, deletion, clearing, and JSON import/export. The source excerpts show the launcher, monitor, store, and manager, while renderer capabilities are documented in the README; some internal wiring is therefore omitted.
Main entry points: CodexHighlighter.cs CDP Monitor · HighlightManagerForm.cs Data Manager · CodexLauncher.cs Launch Coordinator · highlighter.js Anchor Resolution
Components 17
Launch and Monitor
- Native Host
src/CodexHighlighter.cs - Launch Coordinator
src/CodexLauncher.cs - CDP Monitor
src/CodexHighlighter.cs
Transcript Highlighting
- Injected Runtime
src/highlighter.js - Selection Palette
src/highlighter.js - Anchor Resolution
src/highlighter.js - Transcript Observers
src/highlighter.js
Local Data
- Highlight Store
src/CodexHighlighter.cs - Prune Backups
src/CodexHighlighter.cs
Tray Management
- Tray Interface
src/CodexHighlighter.cs - Data Manager
src/HighlightManagerForm.cs
Other components
- User
- Codex Desktop
- Loopback CDP
- CSS Highlights
- Page Data
- JSON Backup Files
Connections 18
- User → Launch Coordinator: opens
- Native Host → Launch Coordinator: delegates launch
- Launch Coordinator → Codex Desktop: starts or focuses
- CDP Monitor → Loopback CDP: connects
- Loopback CDP → Codex Desktop: accesses renderer
- CDP Monitor → Injected Runtime: injects script
- User → Selection Palette: selects text
- Selection Palette → Anchor Resolution: creates or edits
- Injected Runtime → Page Data: reads and writes
- Anchor Resolution → CSS Highlights: renders ranges
- Transcript Observers → Anchor Resolution: schedules re-anchoring
- CDP Monitor → Highlight Store: loads and saves
- CDP Monitor → Loopback CDP: synchronizes data
- CDP Monitor → Prune Backups: writes pruned records
- User → Tray Interface: uses
- Tray Interface → Data Manager: opens
- Data Manager → Highlight Store: reads and replaces
- Data Manager → JSON Backup Files: imports or exports