Changeset 0.17.2 (#77)
This commit is contained in:
65
CHANGELOG.md
65
CHANGELOG.md
@@ -2,6 +2,71 @@
|
||||
|
||||
All notable changes to Chat Switchboard.
|
||||
|
||||
## [0.17.2] — 2026-02-28
|
||||
|
||||
### Added
|
||||
- **CodeMirror 6 integration.** Rich editor infrastructure compiled at Docker
|
||||
build time via esbuild (IIFE bundle, ~295KB min / ~90KB gzip). Two factory
|
||||
functions exposed on `window.CM`:
|
||||
- `CM.chatInput()` — Markdown-mode editor for the chat input with
|
||||
auto-growing height, Enter=send / Shift+Enter=newline, spell check, and
|
||||
WYSIWYG fenced code block decorations (visual container with monospace
|
||||
font and accent border, matching claude.ai UX).
|
||||
- `CM.codeEditor()` — Full-featured code editor for admin extension panel
|
||||
with line numbers, bracket matching, search/replace, fold gutter, and 10
|
||||
bundled language modes (Markdown, JavaScript, JSON, SQL, HTML, CSS, YAML,
|
||||
Go, Python, Rust).
|
||||
- **Graceful degradation.** All CM6 integration points check `window.CM`
|
||||
availability. If the bundle fails to load, the app falls back to native
|
||||
`<textarea>` with zero breakage.
|
||||
- **Dark/Light/System theme toggle.** New appearance setting with three
|
||||
modes. Light theme overrides all CSS variables via `[data-theme="light"]`
|
||||
selector. System mode tracks `prefers-color-scheme` media query in real
|
||||
time. Theme changes emit `theme.changed` on the EventBus; CM6 editors
|
||||
toggle `oneDark` syntax theme via compartment reconfiguration.
|
||||
- **Vim/Emacs keybinding preference.** Editor keybinding mode (Standard /
|
||||
Vim / Emacs) configurable in appearance settings. Applies to code editors
|
||||
and extension editors only — chat input always uses standard keybindings.
|
||||
Live-switchable on already-open editors via `keymap.changed` event.
|
||||
Bundled statically (~40KB for both modes).
|
||||
- **Inline code shortcut.** Ctrl/Cmd+E wraps selection in backticks or
|
||||
inserts an empty inline code pair with cursor between them.
|
||||
- **Code block shortcut.** Typing ` ``` ` at the start of a line expands
|
||||
to a fenced code block with cursor positioned inside. The decoration plugin
|
||||
renders code blocks with a styled visual container in the chat input.
|
||||
- **CI path-based change detection.** New `detect-changes` job classifies
|
||||
changed files into frontend/backend/infra/docs buckets. Test jobs skip
|
||||
when irrelevant (FE-only changes skip Go tests, docs-only changes skip
|
||||
all tests and deploy). Tags always run the full pipeline.
|
||||
|
||||
### Changed
|
||||
- Docker build pipeline: both `Dockerfile.frontend` and unified `Dockerfile`
|
||||
now include a `cm6-build` stage (Node 20 Alpine → esbuild → IIFE bundle).
|
||||
- `ChatInput` abstraction in `chat.js` replaces direct textarea access
|
||||
across 7 callsites (`chat.js`, `tokens.js`, `attachments.js`).
|
||||
- Extension editor in `admin-handlers.js` uses `CM.codeEditor()` with JSON
|
||||
and JavaScript modes, replacing bare `<textarea>` with manual Tab handler.
|
||||
- Service worker excludes `/vendor/codemirror/` from cache (version-busted).
|
||||
- Debug state snapshot includes CM6 version and language list.
|
||||
- `ARCHITECTURE.md` updated to v0.17 reflecting CM6 integration, SQLite
|
||||
dual-driver, modular frontend file structure, and theme system.
|
||||
- CI pipeline header updated to v0.17.2 with path gating documentation.
|
||||
- `build-editor.sh` falls back to `npm install` if `package-lock.json`
|
||||
is missing (belt-and-suspenders for local dev).
|
||||
|
||||
### Fixed
|
||||
- **App initialization crash.** `Events.publish` (nonexistent) → `Events.emit`
|
||||
(correct API). The unhandled exception during `initAppearance()` killed
|
||||
`initListeners()`, leaving the entire app half-initialized — settings modal
|
||||
unclosable, keyboard shortcuts unwired, paste handlers missing.
|
||||
- **Cursor invisible in dark and light mode.** CM6 cursor used `--accent`
|
||||
color (low contrast on both themes). Switched to `--text` for consistent
|
||||
visibility. Added explicit `borderLeftWidth: 2px`.
|
||||
- **Placeholder text offset.** Double padding between `.cm-editor` wrapper
|
||||
(12px) and `.cm-content` (8px) pushed placeholder 20px below expected
|
||||
position. Zeroed `.cm-content` padding — wrapper is the single source of
|
||||
truth.
|
||||
|
||||
## [0.17.1] — 2026-02-27
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user