aboutsummaryrefslogtreecommitdiff
path: root/gui/internal/model/plan.go
Commit message (Collapse)AuthorAgeFilesLines
* the applying flag is atomic; its test waits instead of pollingLukasz Kasprzak2 days1-5/+8
| | | | | | | The race detector found my own new flag: Apply writes it on a worker and Close reads it from the main loop. The test was polling a plain field too, where the real window hears about the apply on the main loop, which orders the writes.
* Settings changes take effect, and keep this copy respects the planLukasz Kasprzak2 days1-0/+18
| | | | | | | | | | | | | | | | | | | | | Five of the Settings window's controls - the sort order, the three column toggles and the preview height - were read when it built its new preferences but never connected to anything, so changing them did nothing until some other control happened to fire, and then they all landed at once out of nowhere. Every control is connected now. The same closure composed a whole Prefs from its own widgets, which wrote the remembered divider positions back as zeros: dragging the panes to taste and then ticking any checkbox threw them away. A settings change is now applied over the preferences as they are, by model.Prefs.WithDisplay - which is where it can be tested, and is. "Keep this copy, replace the other" wrote a Displaces straight into the chain. internal/plan refuses to build two steps that displace one path, because the second destroys what the first put there; the window went round that code, so choosing it for two duplicates of one file left both rows saying "done" with the first file in the Trash. It now refuses the second, naming the file that has the place.
* the window cannot pull the lock out from under a running applyLukasz Kasprzak2 days1-0/+25
| | | | | | | | | | | | | | | | | | Close releases the directory lock and closes the log. The window could reach it while an apply was still running - saving rules, saving settings, adding a directory, or closing the window - and the engine then went on moving files with the log shut underneath: a file moved that no krino undo can see, the rest of the plan silently abandoned, and the directory unlocked while krino was still working in it. PlanTab and UndoTab refuse to close while their apply is in flight (model.ErrApplying), the window's close request and reloadEngine honour the refusal instead of ignoring it, and the tabs and Settings are greyed out for the duration so a button that cannot work says so by being unavailable rather than by an error afterwards. The test starts an apply, calls Close from another goroutine while it is in flight, and requires the refusal.
* the module path is git.labunix.xyz/krinoLukasz Kasprzak2 days1-4/+4
| | | | | | | | | | | So that go install can find it. cgit serves no go-import meta tag, so nginx answers a ?go-get=1 request for /NAME with one pointing at https://git.labunix.xyz/NAME.git; the alternative was carrying a .git suffix through every import line forever. One sed over the imports, both go.mod files, and the dependency gate's whitelist. Nothing else depends on the path. go install works from the next tag, the first release whose go.mod carries it.
* comments that explain the code, not how it was writtenLukasz Kasprzak2 days1-4/+3
| | | | | | | | | | | | | | | | | | 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.
* gui: name the other copy of a duplicate, and offer to keep this one insteadLukasz Kasprzak2 days1-9/+56
|
* gui: size and age columns, column toggles, readable colours, a laid-out ↵Lukasz Kasprzak2 days1-2/+35
| | | | explanation
* gui: coloured actions with headers, a filter over the plan, bulk trash or deleteLukasz Kasprzak3 days1-0/+19
|
* gui: History and undo tab; each plan and undo is its own runLukasz Kasprzak3 days1-16/+25
|
* gui: row menu for trash or permanent delete; Apply frees the directoryLukasz Kasprzak3 days1-3/+7
|
* gui: the Plan tab - scan, review, apply, with the directory lockedLukasz Kasprzak3 days1-4/+33
|
* gui module: the plan tab's model, with testsLukasz Kasprzak3 days1-0/+221