Releases: ideaconnect/go-fyne-pretty-view
Release list
v2.6.0-alpha
v2.5.1-alpha
v2.4.1-alpha
v2.3.0-alpha
What's Changed
- deps: bump golang.org/x/net from 0.55.0 to 0.56.0 in the go-dependencies group across 1 directory by @dependabot[bot] in #33
New Contributors
- @dependabot[bot] made their first contribution in #33
Full Changelog: v2.2.0-alpha...v2.3.0-alpha
v2.2.0-alpha
What's Changed
- Deep-review fixes: full pass — parser/clipboard/release + 9 correctness & hardening fixes (#94–#105) by @bpacholek in #107
Full Changelog: v2.1.7-alpha...v2.2.0-alpha
v2.1.7-alpha — markup raw-text fidelity + parse hardening
Fixes from the pre-launch production-readiness review. The exported /v2 surface is unchanged; stays -alpha.
Fixed
- HTML
<script>/<style>bodies and XML<![CDATA[…]]>are preserved byte-for-byte onReformatinstead of being whitespace-collapsed and entity-escaped. Escaping a script body's<to<produced invalid JavaScript (and a//line comment could collapse onto the next statement); these raw-text spans now round-trip verbatim. Ordinary element text is still escaped as before (#85). - A panic in the raw fallback or the model finish step can no longer escape
Parse. The recover boundary now covers the whole function — not just the structured parsers — degrading to the raw fallback (or an empty document) rather than crashing the embedding host (#86).
Documentation
- README documents the raw-text fidelity and the ordinary-text whitespace canonicalization (#85); fixed a misattached
TypedKey/KeyDowndoc comment and a stale "JSONC is not rewritten" note (#89).
Remaining production-review items (#87 #88 #90 #91 #92) are tracked in the v2.2.0 — production hardening milestone.
Full Changelog: v2.1.6-alpha...v2.1.7-alpha
v2.1.6-alpha — zero-allocation live reproject
The first half of #84 (the #80 follow-up): the live edit reproject now reuses a single segment-build scratch across all physical lines, instead of allocating one temporary per line.
Performance
- Combined with #80's arena pooling, a steady-state keystroke reproject of a large (>2 MiB) buffer now allocates 0 B / 0 allocations on both minified and pretty-printed shapes — the pretty shape previously allocated ~2.16 MB / ~67 000 times (one
[]Segper line). The non-pooledParseEditableColoredbenefits too (~67 000 → ~18 allocations). Output is byte-identical, locked by theTestEditPoolEqualsFreshequality fuzz and a newTestEditPoolPrettyAllocsConstantteeth guard.
The remaining half of #84 — making per-keystroke wall time strictly proportional to the edited region (the in-place line-range splice that revisits the immutable-Document decision) — is still open and P3.
The /v2 surface is unchanged; stays -alpha.
Full Changelog: v2.1.5-alpha...v2.1.6-alpha
v2.1.5-alpha — production-hardening follow-ups
Production-hardening follow-ups — the remaining issues from the code- & test-quality reviews (milestone v2.2.0 — production hardening). The exported /v2 surface is unchanged (TestExportedSurfaceGolden frozen); this stays -alpha (pre-production maturity, not API churn).
Fixed
- XML/HTML
Reformatno longer decodes entities into the buffer — it re-encodes&→&,<→<(and"→"inside attribute values), so a reformat-then-save stays valid markup and round-trips&(#81). Display/copy still show the decoded text. - A JSONC document that begins with a comment auto-detects as JSONC (a
// licenseheader or{ // note) instead of falling back to raw, preserving the comment as a visible node; a//inside a string value still stays plain JSON (#82).
Performance
- The live edit reproject pools its Document arenas + buffer snapshot across keystrokes (#80): a keystroke on a large over-budget buffer drops from ~18.6 MB / 18 allocs to ~32 B / 1 alloc and is ~35 % faster, byte-identical to a fresh parse (locked by a randomized equality fuzz). Wall-time stays O(buffer); work strictly proportional to the edited region is deferred to #84.
Changed
- Dropped the dead
tabWidthparameter from the internalParseEditableColored(#83).
Docs
- Reconciled the contradictory
-alpha/ "v1.0.0 frozen" / "pre-1.0 v0.x" copy to one story across README / package docs / SECURITY.md / CHANGELOG, and added a testable drop-alpha checklist to WORKFLOWS.md (#67).
Full changelog: see CHANGELOG.md.
Full Changelog: v2.1.4-alpha...v2.1.5-alpha
v2.1.4-alpha
Third quality review — fixes + mutation testing (no public API change)
Performance
- Reflow no longer re-allocates the wrapped line's break list every scroll tick. It was a fresh
[]int32local while the highlight passes already pool the identical scratch — ~895 KB of garbage per reflow on a 2 MB single wrapped line, on the Fyne UI goroutine. Now reuses a persistentr.reflowBreaks. Guarded byTestReflowReusesWrapBreaks.
Tests & tooling
make mutation— mutation testing via gremlins over the pure logic packages, gating on test efficacy. Empirically,internal/geometry,internal/model, andinternal/parseall score 100% test efficacy (0 surviving mutants) — the tests detect behavioral changes, not just cover lines.- Gutter digit-width boundary-crossing guard (closes a teeth gap in the #77 memo).
- Folds in the Windows CRLF golden CI fix (CI is green on Linux/macOS/Windows).
Review verdict
No high-severity findings; the hardening-era tests are genuinely teeth-bearing. The "used-only-by-tests" helpers (maxTextWidth/LineString/ProjectionBytes) are intentional memory-invariant instrumentation. Follow-up filed: #83 (drop the dead tabWidth param).
Full diff: v2.1.3-alpha...v2.1.4-alpha
Full Changelog: v2.1.3-alpha...v2.1.4-alpha
v2.1.3-alpha
Production hardening (P2) — no public API change
Robustness (#76)
keyExtendguards a nil renderer before readingr.firstRow(a pre-render call no longer panics).scanStringclamps on a trailing backslash so an unterminated"\can't push a node span past EOF.recomputeMetricsonly locks the cell memo when it measured a non-degenerate cell — a transiently-unavailable font can't permanently render a 1px grid.- Documented that live parse validity isn't refreshed above the
MaxEditBytescap (the indicator freezes rather than going stale-wrong).
Performance (#77)
serializePrettypresizes the spans slice;remapCaretOffsetbinary-searches (locked against the old linear logic over 3000 random cases).applyGuttermemoizes the digit count on the line count.- Regression benches added for big-document plain/worst-case-regex search and wrap reprojection.
Tests & deps
- (#78) Three self-erasing
t.Skips →t.Fatal; a deterministic guard that valid structured input never silently regresses to the raw fallback (surfaced #82: JSONC starting with a comment auto-detects as raw). - (#79)
go.modlowered from the patch-pinnedgo 1.26.4togo 1.25(the real floor, set byx/net/x/image) +toolchain go1.26.4;govulncheckunpinned to@latest; dependencies documented; a written deprecation policy added.
Follow-up filed: #82 (JSONC leading-comment auto-detect).
Full diff: v2.1.2-alpha...v2.1.3-alpha
Full Changelog: v2.1.2-alpha...v2.1.3-alpha