chat: add safe hybrid Markdown editing with strict CSP
ci / linux-arm64-cross (push) Successful in 3m22s
ci / linux-x64 (push) Successful in 3m32s

This commit is contained in:
omar committed 2026-11-02 11:32:31 +03:00
1 parent 3ee2bef7ce
commit f618d8bce9
43 files changed
+18079 -241

No files matched your search

@@ -1,6 +1,30 @@
# Official TS6 visual parity — QA harness (2026-11-01)
## Current result: exact-design correction, 2026-11-01
### Rich-text composer checkpoint (2026-11-02, post-release development)
`rich-editor-csp-confirmed/result.json` passed **14** actual packaged offscreen scenarios: typing,
Shift+Enter, formatting and selection, undo/redo, slash and emoji insertion, persisted raw/hybrid mode,
refused-send preservation, conversation draft/undo isolation, disabled partner/session state,
wide/narrow toolbar collapse, inert hostile Markdown and IME composition. Network requests and page/console
errors were empty. Windows redo uses its actual Ctrl+Y binding; the initial smoke's Mac/Linux shortcut
was corrected, not added to production as an unrelated shortcut.
The initial paired run detected CodeMirror's inline stylesheet insertion being blocked by CSP.
The pinned vendor build now uses style-mod's constructed-sheet path on Document as well as ShadowRoot;
the exact guarded adaptation is recorded in vendor provenance. No CSP directive was relaxed.
`rich-editor-csp-pairs/` then passed **8/8** main-screen comparisons with no blocked cases or console errors.
Packaged app.asar SHA-256: `676360e8aaa7ef3bc4b49098a50c7dd1ecaf32e8eca7ce38a6a99d1a97f858d9`;
native core: `86d216cf4891a009548f0f38155ec80f03160e42e6582ea914e8049aa8d59469` (the verified v0.1.6 core).
The Node consumer suite passed **505**, with one skipped and no failures. Existing message/history smoke
`rich-editor-message-regression/result.json` passed 621-row IPC persistence/restart, cross-scope isolation,
safe local KaTeX/Mermaid and generated attack rejection after the parser gained source ranges.
These are synthetic Windows hidden-runtime checks, not a live send or Asahi proof. Capture methods were
refusing test stubs; no physical media was opened. Preview stays raw above 16,384 UTF-16 units (already beyond
the sendable 8 KiB message bound). The feature is not in the separately published v0.1.6 snapshot.
### Common-screen correction checkpoint (2026-11-02, after the release cut)
`common-screen-confirmed/` under the exact-design evidence root passed **8/8** `main@few` comparisons:
@@ -282,7 +282,7 @@ Legacy event strings (en / ru):
| `.ts-chat-input-container-content` | look | bg `--tsv-bg` (theme); radius 8px; flex column; z-index 6 | | theme@34898, main.css@211964 |
| | light extra | `--ts-chat-background-color` = contrast-bg on `.ts-chat-input-container-inner`; input colour font-color | | main.js@201685@115487 (light only) |
| content-inner | layout | flex row, nowrap, stretch | | main.css@212210 |
| textarea `.ts-chat-input` | typography | **14px**, weight 400, letter-spacing −0.025rem (−0.4px), line-height **18px**, colour font-color (#FFF / #1a1a1a) | | main.css@212377 |
| editor `.ts-chat-input` | typography | **14px**, weight 400, letter-spacing −0.025rem (−0.375px at the source's fixed 15px root), line-height **18px**, colour font-color (#FFF / #1a1a1a) | | main.css@212377, @1034 |
| | box | padding **8px 10px**; max-height 250px; transparent; no border | | |
| | `.error` | colour `--ts-error-color` #f82929 | | |
| placeholder (`.is-empty::before`) | look | subtitle colour #697A97 / #445d77; 14px; absolute 0,0 | | main.css@205825 |
@@ -47,7 +47,7 @@ User captures of the official client (session-local, not copied) confirmed place
| `.msg-system` | `.ts-chat-message-system-body.compact` | 23px, radius 10, #131824→transparent 80%, 13/15 subtitle, bold names #acacac | css@477464, D@33354 |
| `.composer` | `.ts-chat-input-container` | margin 10, `--tsv-bg`, 1px #697a97 → tint, radius 8 | css@206847, D@34684 |
| `.composer-toolbar`, `.composer-tool` | `.ts-chat-input-edit-toolbar` | shaded, 2px 10px, gap 2.5, buttons 24px radius 2 | css@213134–215372 |
| `.composer textarea` | `.ts-chat-input` | 14/18, padding 8px 10px, letter-spacing −.025rem | css@212377 |
| `.composer-editor` / CodeMirror content | `.ts-chat-input` | 14/18, padding 8px 10px, letter-spacing −.375px (source −.025rem at 15px root) | css@212377, css@1034 |
| `.settings-nav`, `.nav-item` | `.tsv-settings-categories` | clamp(30ch,20vw,50ch), 44px rows, highlight #282F40 + 4px tint bar | css@259528, D@55972–56581 |
| `.card` | `.ts-widget-wrapper` | header-bg, radius 15, padding 8px 20px, 12px gaps | D@57054, css@35075 |
| `.card-title` | `.ts-widget-section-header .title` | 15/19 semibold, 16px below | D@57857 |