aboutsummaryrefslogtreecommitdiff
path: root/gui/internal/model/preview.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-17 12:11:42 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-17 12:11:42 +0200
commitbddbd74e4a73e8e32bcf648efd1cac5655f6d0cd (patch)
tree187e6a1fb722d9ab97d2076f69f997f5d371e943 /gui/internal/model/preview.go
parentcd7425b81f963a948f0abe7df3f9e58e190c2b78 (diff)
downloadkrino-bddbd74e4a73e8e32bcf648efd1cac5655f6d0cd.tar.gz
krino-bddbd74e4a73e8e32bcf648efd1cac5655f6d0cd.zip
comments that explain the code, not how it was written
About 340 comments cited the development process: task and plan numbers, fix waves, rulings, reviewers, and the author in the third person with a date. None of that exists outside the work itself, so to a reader it pointed at nothing. Each one now states the engineering reason it was standing in front of; where a comment was provenance and nothing else, it is gone. References to docs/design.md and docs/gui-design.md by section stay: both ship with the repository. The design documents lose their amendment diaries - CHANGELOG.md is that record - and the GUI's says plainly that the window has gone further than the document. Only comments changed. Every .go file was parsed and its code printed with comments stripped, before and after: the two hashes are identical across all 175 files.
Diffstat (limited to 'gui/internal/model/preview.go')
-rw-r--r--gui/internal/model/preview.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/gui/internal/model/preview.go b/gui/internal/model/preview.go
index a180dff..f8bf75d 100644
--- a/gui/internal/model/preview.go
+++ b/gui/internal/model/preview.go
@@ -25,7 +25,7 @@ const (
)
// Preview is what to show of a file beside its explanation: a picture, some
-// of its text, or nothing with the reason (his request, 2026-09-16).
+// of its text, or nothing with the reason.
type Preview struct {
Kind PreviewKind
Image string // a file to show: the file itself, or a rendered page
@@ -82,9 +82,8 @@ func MakePreview(ctx context.Context, path, tmp string, px int) Preview {
//
// Each render goes in a directory of its own. pdftoppm names its output
// after the page number, so a shared directory would hold several files
-// called page-1.png and the wrong one could be picked up - which is what
-// happened: a preview showed the page of a PDF looked at earlier (his
-// report, 2026-09-17).
+// called page-1.png and the wrong one could be picked up - a preview could
+// show the page of a PDF looked at earlier.
func pdfPreview(ctx context.Context, path, tmp string, sz int64, px int) Preview {
if _, err := exec.LookPath("pdftoppm"); err == nil {
dir, err := os.MkdirTemp(tmp, "page-")