Public: anyone can read this; the crew can change it.
A .dxf drawing opens as a picture on its file page: lines, circles, arcs and polylines #11913
Check · Review · Land · Live — No review yet.
A `.dxf` file now opens on its file page as an inline SVG drawing, with entity counts and layer names beside it. New tests pass, `tsc` is clean and `bun scripts/design-lint.ts` passes. I did not run the full suite. The before/after screenshots at 390 px and 1280 px are not in this pull, because the sandbox cannot take them. `scripts/gate.ts` printed only the pre-push hook message, and I did not ch…
8 files · +353 −1
look green — it answered, no tests were run, ready for a look deploy 426a8b3
Check passeddeploy 426a8b3
Website spec: 23 findings (report only)
- / <a href="/admin-ada0/admin/app/production/open"> has no accessible name — names
- / <a href="/bad-name-12dd/bad-name/app/production/open"> has no accessible name — names
- /front <a href="/admin-ada0/admin/app/production/open"> has no accessible name — names
- /front <a href="/bad-name-12dd/bad-name/app/production/open"> has no accessible name — names
- /board http://127.0.0.1:40725/board answered 303 — https://specification.website/
- /notes http://127.0.0.1:40725/notes answered 303 — https://specification.website/
- /feed http://127.0.0.1:40725/feed answered 303 — https://specification.website/
- /review http://127.0.0.1:40725/review answered 303 — https://specification.website/
- /releases http://127.0.0.1:40725/releases answered 303 — https://specification.website/
- /repos http://127.0.0.1:40725/repos answered 303 — https://specification.website/
- /map http://127.0.0.1:40725/map answered 303 — https://specification.website/
- /system http://127.0.0.1:40725/system answered 303 — https://specification.website/
- /talk http://127.0.0.1:40725/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:40725/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:40725/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:40725/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:40725/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:40725/settings/crew?help answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/next expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/waves expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/milestones expected exactly one <h1>, found 2 — headings
A .dxf file now opens on its file page as an inline SVG drawing, with entity counts and layer names beside it. New tests pass, tsc is clean and bun scripts/design-lint.ts passes. I did not run the full suite. The before/after screenshots at 390 px and 1280 px are not in this pull, because the sandbox cannot take them. scripts/gate.ts printed only the pre-push hook message, and I did not check it passes.
What changed
- Renderer:
src/web/render/dxf.tsreads the ASCII ENTITIES section and draws LINE, CIRCLE, ARC and LWPOLYLINE. Everything else, TEXT included, is counted as an entity but not drawn. The picture is scaled to its bounding box with y flipped. - Numbers: a NaN, Infinity or beyond ±1e9 value is dropped, and every string is escaped. Past 50,000 entities, nothing more is drawn.
- Kind and registration:
kinds.tsadds the kinddxfwith a 5 MB cap. It is recognised by the.dxfname or by a0\nSECTIONhead, andrenderers.tsregisters it. - Fallback: a binary DXF is classed as binary by the existing NUL check. Empty, header-only, no-EOF, over-cap and nothing-drawable files fall back to the source view with a one-line reason; none throws.
- Style and docs:
.dxf-viewhas CSS incontent.tsand a short entry indocs/design/areas/render.md. The Content-Security-Policy is untouched. - Tests:
- test/render-dxf.test.ts covers one of each entity, scaling and y flip, the fallbacks including a 10 MB file, NaN and Infinity, and escaping.
- test/render-kinds.test.ts and test/fuzz-renderers.test.ts each gain a dxf case.
Not done
- Polyline bulges (group code 42) are drawn as straight segments, and the page says so.
- No layer colours, no TEXT, no INSERT blocks, no splines.
- The file does not say what unit its coordinates are in, so the page states that rather than guessing.
How to try it: commit a .dxf file to a repository and open its file page. Open it on the pull's preview deployment (lab--<pr>--forge-trevato-apps.open-platform.sh).
I pushed an empty Try: commit because the pre-push hook required one.
🤖 Generated with Claude Code
A
.dxffile now opens on its file page as an inline SVG drawing, with entity counts and layer names beside it. New tests pass,tscis clean andbun scripts/design-lint.tspasses. I did not run the full suite. The before/after screenshots at 390 px and 1280 px are not in this pull, because the sandbox cannot take them.scripts/gate.tsprinted only the pre-push hook message, and I did not check it passes.What changed
src/web/render/dxf.tsreads the ASCII ENTITIES section and draws LINE, CIRCLE, ARC and LWPOLYLINE. Everything else, TEXT included, is counted as an entity but not drawn. The picture is scaled to its bounding box with y flipped.kinds.tsadds the kinddxfwith a 5 MB cap. It is recognised by the.dxfname or by a0\nSECTIONhead, andrenderers.tsregisters it..dxf-viewhas CSS incontent.tsand a short entry indocs/design/areas/render.md. The Content-Security-Policy is untouched.-
test/render-dxf.test.tscovers one of each entity, scaling and y flip, the fallbacks including a 10 MB file, NaN and Infinity, and escaping. -test/render-kinds.test.tsandtest/fuzz-renderers.test.tseach gain a dxf case.Not done
How to try it: commit a
.dxffile to a repository and open its file page. Open it on the pull's preview deployment (lab--<pr>--forge-trevato-apps.open-platform.sh).I pushed an empty
Try:commit because the pre-push hook required one.🤖 Generated with Claude Code
Closes #11861