Results table: file icons, sortable columns, row selection, context menu#73
Open
AlanKK wants to merge 4 commits into
Open
Results table: file icons, sortable columns, row selection, context menu#73AlanKK wants to merge 4 commits into
AlanKK wants to merge 4 commits into
Conversation
The GUI logged two Fyne v2.8.0 diagnostics on every launch:
Fyne error: Preferences API requires a unique ID, use app.NewWithID()
*** This application has not been migrated to the fyne.Do threading model ***
app.New() left UniqueID() falling back to a throwaway "missing-id-<unix>"
regenerated per launch, which would silently break the Preferences and
Storage APIs. The migration banner precedes Fyne removing that safety in
the next major release.
Declare both in code via app.SetMetadata + app.NewWithID rather than a
FyneApp.toml: `make app` runs `fyne package -executable`, which wraps the
prebuilt binary and never compiles TOML metadata in, and
checkLocalMetadata bails out under -tags release and looks for the file
next to the executable — inside the .app bundle, where none ships. Using
Migrations{"fyneDo": true} also avoids threading -tags migrated_fynedo
through every build path.
The app was already migrated in practice: every off-main-thread UI
mutation (search goroutine, tooltip hover, tap-to-copy, debounce timer)
goes through fyne.Do, and Fyne dispatches systray menu actions via
runOnMain. Declaring the migration does silence Fyne's wrong-thread
runtime warnings, so AGENTS.md records the contract for future UI code.
Also migrate .github/copilot-instructions.md to AGENTS.md with CLAUDE.md
as a symlink, and fix its stale `ev -b copilot-instructions.md` example.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Haq5pxXkyML6TgwEKfss7n
Brings the GUI closer to Everything for Windows and a native file manager. - File-type icons per row, mapped from extension and object type. - Click a header to sort by name, path, size or modified; click again to reverse. Sorting runs on the UI thread, where the sort state is written. - Row-level selection with keyboard navigation (up/down/enter/escape). Fyne highlights a single cell, so the row band is drawn per-cell. - Right-click menu: reveal in the file manager, copy name/path/folder. - Double-click reveals the file. handleOpenFile was dead code until now. - Main menu with Close Window and About. theme.Icon returned the app logo for every icon name, which would have made every file-type icon identical; it now delegates to the default theme. Padding was 0, which collapsed the table's column dividers -- Fyne only starts a resize drag inside one -- so columns could not be resized at all. GetFileSizeMod also returns raw size and mod time so sorting does not need a second stat per row. Selection happens on mouse press, not Tapped: Fyne defers Tapped on a DoubleTappable widget for the system double-click interval, which showed up as lag before the row highlighted. Cell updates only repaint what changed, as the callback runs for every visible cell on each refresh. Tool tips are cancelled when the context menu opens and when scrolling recycles a cell onto another row -- the library shows a tip on its own timer and captures the text when armed, so a stale one either drew under the menu overlay with no layer or showed the wrong file's details. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wzp3FVUYuL1ESJGfrimHMM
The plan has been executed; the code and its tests are the record now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wzp3FVUYuL1ESJGfrimHMM
#72 landed overlapping work on main while this branch was open. Both solved column resizing and reworked tooltips, differently. Kept from main: padding 4 / separator 1 for the resize grab zone, the redesigned GetFileInfo with path wrapping, and the Name-column overflow fallback. Kept from this branch: file-type icons, sortable headers, row selection, the context menu and keyboard navigation. The Name column's character budget now subtracts the icon width, or the overflow fallback #72 added would misjudge where the text ends. Dropped the per-header resize grip: main's separator thickness of 1 draws the dividers, so the grip was a second affordance for the same thing. GetFileSizeMod now formats via HumanizeSize rather than repeating the size ladder, so sizes under 1K read as bytes instead of "0.5K". Set the app icon explicitly. The menu bar tray falls back to the app icon and then to a broken-image glyph; it only ever showed the logo because theme.Icon returned it for every icon name, which the file-type icons required changing. Tests run under the app theme: the test theme has no bold monospace font, which the Name cell now measures. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wzp3FVUYuL1ESJGfrimHMM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the results table closer to Everything for Windows and a native file manager.
What's new
handleOpenFilewas dead code until now.Also carries the earlier app ID +
fyne.Domigration commit, which never reached main.Fixes along the way
theme.Iconreturned the app logo for every icon name, which would have made all file-type icons identical. It now delegates to the default theme — and the app icon is set explicitly, since the menu bar tray was relying on that accident and fell back to a broken-image glyph without it.Tapped. Fyne defersTappedon aDoubleTappablewidget for the system double-click interval, which showed up as visible lag before the row highlighted.no tool tip layer created for current overlay) or showed the wrong file's details.Merge with #72
#72 landed overlapping work while this branch was open — both solved column resizing and reworked tooltips, differently. Reconciled in
de2e5c9:GetFileInfowith path wrapping, Name-column overflow fallback.GetFileSizeModformats viaHumanizeSizeinstead of repeating the size ladder, so sizes under 1K read as bytes rather than0.5K.Testing
make build,make test,go test -race,go vetandgofmtall clean; new unit tests cover icon mapping, sorting, selection, header state and the two tooltip cancellations.Input-driven behaviour can't be exercised headlessly and needs a human pass: the context menu, double-click reveal, arrow-key navigation, column drag-resize, and the two tooltip repros (hover a row for a full second then right-click; hover then scroll without moving the pointer).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Wzp3FVUYuL1ESJGfrimHMM