Skip to content

fix(ui): use full hinting for listing text - #303

Closed
OldJobobo wants to merge 1 commit into
thisisgm:mainfrom
OldJobobo:fix/listing-full-font-hinting
Closed

OldJobobo wants to merge 1 commit into
thisisgm:mainfrom
OldJobobo:fix/listing-full-font-hinting

Conversation

@OldJobobo

@OldJobobo OldJobobo commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Request explicit Font.PreferFullHinting for listing names/metadata in list, columns and grid views, and their rename fields. On Maple Mono NF at scale 1 this makes the small listing text noticeably clearer.

Flea already enables native text rendering. This patch does not change the renderer, force a font family, increase text sizes, add a setting, or introduce the diagnostic item-tree traversal/timer. It preserves the existing system-family and size bindings and leaves icon rendering alone.

Full hinting can change horizontal advances, so the matching filename-budget and column-autofit TextMetrics also use native rendering and full hinting. Existing caption containment checks now include rounded pixel extents; the Recent layout test compares against its actual dual-column floor instead of assuming it exceeds the single-pane floor. Source-line allowances and byte/line pins are re-derived, with no new allowances or production objects.

This is deliberately a draft: the visual preference is font/display dependent, especially at fractional scale, and needs maintainer review rather than a claim that full hinting universally looks better.

Privacy-safe visual evidence

Actual Flea: before and after

Actual Flea before and after full hinting, using only generated sample files

Same synthetic files, Maple Mono NF Regular, 14 px body size and scale 1; both sides use native rendering. Open the original PNG at 100%:
https://raw.githubusercontent.com/OldJobobo/flea/evidence/font-hinting/before-after.png

Current, vertical and full hinting

Current/default, vertical and full native font hinting at five text sizes

Current/default, vertical and full hinting at 10, 12, 14, 16 and 20 px, with native rendering in every column:
https://raw.githubusercontent.com/OldJobobo/flea/evidence/font-hinting/hinting-comparison.png

The assets and standalone comparison QML are on a separate fork-only evidence branch, not in this code diff. Captures show only generated samples and an isolated home, omit the filesystem status strip, and have stripped PNG metadata. Capture details and individual before/after images:
https://github.com/OldJobobo/flea/blob/evidence/font-hinting/README.md

Validation

  • Rust build/test: 2541 passed, 1 ignored, 0 failed.
  • New tests/font-hinting.sh: 444 checks across all seven supported size stops, including lazy match/location/drop/tooltip text and matching measurements. Against unchanged upstream, it reports 144 failures.
  • Passed: columnrow-geom, gridcaption, gridmark, listnamebudget, rowcost, budget, all 14 static gates, file budgets, shell syntax and code diff whitespace checks.
  • Broader local checks are not entirely green: headless Hyprland warning gates, the smallest-stop rename overhang assumption, qmllint import/category mismatches, and the rename-grid-bottom fixture's missing dropsLocal property fail on the unchanged baseline too. The functional header/startup probes pass; startup remains at 628 objects. The full matrix was not run.

Detailed results, including the interrupted rename-list-bottom attempt:
https://github.com/OldJobobo/flea/blob/evidence/font-hinting/VALIDATION.md

--[ Pi :: gpt-6.1-sol ]--
--- on behalf of: @OldJobobo

Summary by CodeRabbit

  • Bug Fixes

    • Improved text hinting across file listings, grid captions, rename fields, and other text elements for more consistent font rendering and sizing.
    • Updated layout checks to account for rounded text heights and dual-pane Recent location visibility.
  • Tests

    • Added automated coverage for text rendering, sizing, and measured width budgets across multiple font sizes.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b5e0d9b7-654e-4db9-be04-ea4255a7c44c
📥 Commits

Reviewing files that changed from the base of the PR and between 664d803 and b740792.

⛔ Files ignored due to path filters (1)
  • tests/staticgates-unqualified.tsv is excluded by !**/*.tsv
📒 Files selected for processing (15)
  • AGENTS.md
  • tests/font-hinting.qml
  • tests/font-hinting.sh
  • tests/gridcaption.qml
  • tests/recentcol.qml
  • tests/run-all.sh
  • tests/startup-units.txt
  • tools/flea-file-budget
  • ui/ColumnRow.qml
  • ui/FitMetrics.qml
  • ui/GridTile.qml
  • ui/MatchText.qml
  • ui/RenameField.qml
  • ui/Row.qml
  • ui/Theme.qml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

Listing, rename, and related text now request full font hinting. Glyph measurement uses native text rendering and full hinting. The changes also add a multi-size test and update related test expectations and project records.

Changes: Listing text hinting

Layer / File(s) Summary
Production text hinting
ui/ColumnRow.qml, ui/FitMetrics.qml, ui/GridTile.qml, ui/MatchText.qml, ui/RenameField.qml, ui/Row.qml, ui/Theme.qml, tools/flea-file-budget, tests/startup-units.txt, AGENTS.md
Text elements now request full font hinting. FitMetrics and both TextMetrics objects use native rendering and full hinting. The file budget, startup byte total, and documentation records are updated.
Hinting tests and suite checks
tests/font-hinting.qml, tests/font-hinting.sh, tests/run-all.sh, tests/gridcaption.qml, tests/recentcol.qml
A QML test checks text properties, component coverage, and width budgets at seven sizes. The headless suite runs the test. Caption-fit and dual Recent expectations are updated.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: thisisgm

Merge Risk: ⚪ Minimal · up to b7407

The change asks for full font hinting on listing text and keeps the existing fonts, sizes and renderer. No concrete merge-blocking problem was found. The new test fixture's grid tile sizing could not be verified, but that affects test coverage only and does not block the merge.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (13 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: enabling full font hinting for listing text in the UI.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (13 skipped: 13 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OldJobobo

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@OldJobobo
OldJobobo marked this pull request as ready for review October 13, 2026 06:37
@thisisgm

Copy link
Copy Markdown
Owner

Great one, will add!

@thisisgm

Copy link
Copy Markdown
Owner

@greptileai review

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change reaches Flea’s main file-browsing text and rename workflow.

Fix the new grid fixture before merging; also align the Trash date measurement with its font.

Fix All in Claude CodeFindings

  1. P1 Grid test uses missing sizes ▶
  2. P2 Trash date measurements no longer match ▶
Fix with agent prompt
### Issue 1
tests/font-hinting.qml:26
**Grid test uses missing sizes.** `Theme.grid` defines neither `cellWidth` nor `cellHeight`. These bindings therefore assign `undefined` to the tile's dimensions and produce Qt warnings. `font-hinting.sh` rejects warnings, so the newly registered suite makes `run-all.sh` fail. Use `Theme.grid.minCellWidth` and derive the height through `GridGeometry.cellHeightFor`, as the existing grid fixtures do.

### Issue 2
ui/Theme.qml:122
**Trash date measurements no longer match.** `bodyGlyphMetrics` also sets `Theme.column.trashDate`, but the `deleted` text in `TrashView.qml` still uses default hinting. If full hinting rounds a font's character widths down, the date column now shrinks while its text does not, cutting off timestamps even when the pane has enough room. Give the Trash date the same hinting choice, or keep a separate measurement that matches its existing font.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The PR requests full hinting for listing text and rename fields while keeping the existing font and renderer choices.

  • Flea’s listing and rename text uses full hinting with matching text measurements.

Reviews (1) · Last reviewed commit: "fix(ui): fully hint listing text and mat..." · Reviewed by Greptile

Comment thread tests/font-hinting.qml
Flea.MatchText { id: match; width: 900; height: 32; text: root.sample.n }
Flea.Row { id: row; width: 900; row: Object.assign({}, root.sample, { n: "Reference/" + root.sample.n }); hiddenCols: [] }
Flea.ColumnRow { id: columnRow; width: 900; row: root.sample; showSize: true; pane: searchPane }
Flea.GridTile { id: tile; width: Flea.Theme.grid.cellWidth; height: Flea.Theme.grid.cellHeight; row: Object.assign({}, root.sample, { n: "a-very-long-synthetic-filename-that-needs-an-elided-grid-caption-and-a-hover-tip.txt" }); hovered: true }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Grid test uses missing sizes. Theme.grid defines neither cellWidth nor cellHeight. These bindings therefore assign undefined to the tile's dimensions and produce Qt warnings. font-hinting.sh rejects warnings, so the newly registered suite makes run-all.sh fail. Use Theme.grid.minCellWidth and derive the height through GridGeometry.cellHeightFor, as the existing grid fixtures do.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/font-hinting.qml
Line: 26

Comment:
**Grid test uses missing sizes.** `Theme.grid` defines neither `cellWidth` nor `cellHeight`. These bindings therefore assign `undefined` to the tile's dimensions and produce Qt warnings. `font-hinting.sh` rejects warnings, so the newly registered suite makes `run-all.sh` fail. Use `Theme.grid.minCellWidth` and derive the height through `GridGeometry.cellHeightFor`, as the existing grid fixtures do.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code

Comment thread ui/Theme.qml

// Trash draws its Deleted cell at body, and body/bodySmall is not one ratio across the size stops.
TextMetrics { id: bodyGlyphMetrics; font.family: Style.font.family; font.pixelSize: root.font.body; text: "0" }
TextMetrics { id: bodyGlyphMetrics; renderType: Text.NativeRendering; font.family: Style.font.family; font.hintingPreference: Font.PreferFullHinting; font.pixelSize: root.font.body; text: "0" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Trash date measurements no longer match. bodyGlyphMetrics also sets Theme.column.trashDate, but the deleted text in TrashView.qml still uses default hinting. If full hinting rounds a font's character widths down, the date column now shrinks while its text does not, cutting off timestamps even when the pane has enough room. Give the Trash date the same hinting choice, or keep a separate measurement that matches its existing font.

Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/Theme.qml
Line: 122

Comment:
**Trash date measurements no longer match.** `bodyGlyphMetrics` also sets `Theme.column.trashDate`, but the `deleted` text in `TrashView.qml` still uses default hinting. If full hinting rounds a font's character widths down, the date column now shrinks while its text does not, cutting off timestamps even when the pane has enough room. Give the Trash date the same hinting choice, or keep a separate measurement that matches its existing font.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code

@thisisgm

Copy link
Copy Markdown
Owner

Flea's interface moved from QML to GPUI in v0.4.0 (https://github.com/thisisgm/flea/releases/tag/v0.4.0), so this QML change no longer applies. Thanks @OldJobobo!

@thisisgm thisisgm closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants