Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
14 lines
3.6 KiB
Markdown
14 lines
3.6 KiB
Markdown
FAIL
|
|
|
|
1. `../Ely-GPUI-Components/src/typography/math.rs:122` — The guarded layout failure logs the entire formula source, violating the rule against logging document content and PRD §18.2. A parseable formula containing confidential text reaches this branch whenever RaTeX layout panics. A fault-injected copy reproduced `latex: RaTeX failed to lay out "\\text{PRIVATESENTINEL}"` in the captured diagnostic log; this verifies the error path, not a naturally panicking input. Remove the source from diagnostics and add a regression asserting that layout failures cannot log document text.
|
|
|
|
2. `../Ely-GPUI-Components/src/typography/math.rs:141` — Formula assets have no release path; the same problem affects `diagram.rs:116` and `picture.rs:158`. GPUI's application asset cache retains their source keys and decoded images until explicitly removed, and painted images also require atlas cleanup. The exact-source view probe loaded a formula, removed it from the view, and still found its asset cached. Opening and closing distinct documents in one window therefore accumulates resources, contrary to PERF-08. The new gap row documents this defect but does not resolve it. Give these assets a bounded or owner-managed lifetime and release unused cache entries and atlas images; test repeated removal without breaking shared users.
|
|
|
|
3. `../Ely-GPUI-Components/src/documents/render.rs:356` — Invalid math replaces the original formula with only an error message; asynchronous failures in `typography/math.rs:146` do the same. Additionally, `math.rs:39` and `math.rs:94` discard RaTeX's error location by keeping only `error.message`. For `$$x^2^3$$`, the renderer shows only `Double superscript`, losing both `x^2^3` and the parser's position 3. This violates C14.2 and PRD §14.2. Preserve the source alongside parse/layout/raster errors and retain the available error position; cover the rendered failure state, not just parser rejection.
|
|
|
|
4. `../Ely-GPUI-Components/src/typography/math.rs:113` — Zero SVG padding clips outlined glyphs that extend beyond RaTeX's layout metrics. The exact-source probe for `\text{私密}` at 16 px produced an SVG viewport height of 19.626667 with glyph ink extending to 21.28897, so rasterization cuts off the characters' bottom strokes. Even `x` extends above and below its viewport. Account for the actual glyph bounds or sufficient padding, include that space in the returned logical size, and test that complete glyphs survive rasterization.
|
|
|
|
5. `../Ely-GPUI-Components/src/documents/picture.rs:65` — The `file://` branch treats URI components as filename text. `file:///C:/notes/a.png#preview` resolves to `C:/notes/a.png#preview`, so an existing `a.png` fails to load. `file://server/share/a.png` becomes the relative path `server/share/a.png`, potentially reading an unrelated working-directory file instead. Both cases failed exact-source probes. Parse file URLs before converting them to paths: exclude query/fragment components, preserve supported authorities correctly, and explicitly reject unsupported hosts. Add regressions for these cases.
|
|
|
|
6. `../Ely-GPUI-Components/src/documents/diagram.rs:71` — Assigning only `theme.text_color` does not apply Ely's foreground to ordinary diagram labels. With ink `#eeeeee`, `flowchart LR\n A --> B` emits Mermaid's default `#e0dfdf` and no `#eeeeee`; the exact-source probe failed. This contradicts the last decision's claim that diagram text uses Ely's palette. The existing test named `a_flowchart_draws_with_the_ground_and_ink` checks only the background. Map the foreground to the theme fields actually used by unstyled labels and assert their emitted colors.
|