Skip to content

File view: the recent list tells when each workbook was last changed - #463

Merged
h-a-n-a-s-h-i merged 5 commits into
storytold:mainfrom
arcanii:recent-modified
Oct 13, 2026
Merged

h-a-n-a-s-h-i merged 5 commits into
storytold:mainfrom
arcanii:recent-modified

Conversation

@arcanii

@arcanii arcanii commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

The follow-up invited in #337: the recent list's modified column, on top of the File view from #331.

What it does

The recent workbooks on the File view's Home and Open pages gain a Modified column: "Just now", "5 min ago", "3 h ago", "Yesterday", "4 days ago", "3 weeks ago", "5 months ago", "2 years ago". A file that can't be reached (moved, deleted, on a drive that is away) says "Not available".

How

  • The file system is never asked while drawing. RecentFiles, a field of Backstage, starts a thread that reads each file's metadata; the list shows each answer as it comes back and asks for a repaint. A network drive that is asleep, or a share that is away, doesn't hold up the view: its rows fill in late, or say "Not available".
  • One thread asks at a time, so a drive that never answers holds up one thread, not one for every time the view is opened. A view opened anew asks anew, so the times are current.
  • Only metadata is read. No workbook is opened until the user picks one, as before. The module's opening comment said nothing on disk is touched; it now says what is.
  • Ages, not dates. The UI crate has no time zone to tell a date by (now_serial is UTC), and a date could be a day out. "Yesterday" means 24 to 48 hours ago.
  • Translations. From two days on a count is never one, so each language needs one form of "days", "weeks", "months" and "years". The ten strings are in all nine catalogs, with the count placed by {n}, the way Page {page} of {pages} places its numbers. Russian uses abbreviated units, which don't decline with the count. The translations are mine and unreviewed.
  • Layout. A long name or folder now stops short of the column instead of running under it. The web build (no files to ask about) and a window too narrow for the column show the list as it was.

Not in this pull request

  • Dates and times instead of ages, which need the local time zone.
  • Pinning a workbook, or removing one from the list.

Checks

Run locally on Windows with Rust 1.99. fmt, clippy -D warnings, assets, layers and wasm pass.

Tests: 1327 pass. Three fail, and they fail the same way on an untouched checkout of main at 3926d21 on this machine, in code this change doesn't touch:

  • i18n::tests::translations_are_unique_and_preserve_unknown_text: "missing French: Different First Page". While adding my strings I noticed that i18n/fr.rs looks out of step in its File view section, for example "More workbooks" => "Commentaire suivant" and "No recent workbooks yet." => "Rien à imprimer.". I left it alone; my ten entries there are placed after "More workbooks" like in the other catalogs.
  • io::tests::csv_save_keeps_the_separator_it_was_opened_with and tests::saving_an_opened_semicolon_csv_keeps_semicolons: a twelve-digit number is written as 1.24412E+11.

New tests, both in backstage.rs: the ages in words (boundaries, hostile numbers, and that every language gives words with no {n} left in them), and the lookup (a file that is there, one that isn't, and that a list is not asked about twice). tests/file_menu.rs passes unchanged.

Looked at offscreen renders of Home and Open in the light and dark themes and in English, Japanese and German, with a long path and a missing file in the list.

Docs: the Backstage row and the revision history in docs/ui-parity.md.

🤖 Generated with Claude Code

The recent workbooks on the File view's Home and Open pages gain a
Modified column: "Just now", "5 min ago", "3 h ago", "Yesterday",
"4 days ago", "3 weeks ago", "5 months ago", "2 years ago", or
"Not available" for a file that can't be reached.

The file system is never asked while drawing. A thread asks for each
file's metadata and the list shows each answer as it comes back, so a
network drive that is asleep or a share that is away doesn't hold up
the view. One thread asks at a time; a view opened anew asks anew. Only
metadata is read: no workbook is opened until the user picks one.

The list tells ages rather than dates because the UI has no time zone
to tell a date by. From two days on a count is never one, so each
language needs one form of "days", "weeks", "months" and "years"; the
ten strings are in the nine catalogs, with the count placed by a {n}
in each, as "Page {page} of {pages}" does.

A long name or folder now stops short of the column instead of running
under it. The web build, which has no files to ask about, and a narrow
window show the list as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arcanii added a commit to arcanii/DevCraft that referenced this pull request Oct 12, 2026
storytold#463, from the branch recent-modified: the recent list on upstream's File page tells when each workbook was last changed. It is the part of the fork's File page the maintainers asked for when they closed storytold#337. Not in the fork's main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arcanii added a commit to arcanii/DevCraft that referenced this pull request Oct 12, 2026
…hole pixels

A capture of Excel on a display at 150% gave the measure: its outline is two
device pixels, the gridline's own and the one outside it, on every side.
Upstream's is three there (two points), centred half a point outside the cells,
which puts the bottom and right sides a pixel past the gridlines they should
cover and leaves a grey line showing inside them.

The fork now paints the outline as four bars, each covering its gridline and
reaching outward from it, a whole number of device pixels wide at any display
scale. What is inside the outline is exactly the inside of the cells. The bars
are placed from where the renderer puts each gridline: `gridline` repeats
epaint's rule for moving a line onto device pixels, and a test renders the grid
at 100%, 125%, 150% and 200% and compares the two pixel by pixel, for each
weight, so a renderer that changes its rule is noticed.

The highlight of a cell being typed into is the same bars: the right one is left
out once the text reaches it, the bottom one when the editor is taller than its
cell.

At 150% the weights are three, two and two pixels: Thin is what Excel draws.
Thin and Hairline meet there because upstream's gridline is itself two pixels
wide at that scale, and the outline is never thinner than the gridline it
covers.

One more hook in grid.rs: paint_selection calls the fork's paint_outline in
place of upstream's rect_stroke.

Also recorded in ROADMAP-aniefork.md: the highlight that stays on its cell is
offered upstream as storytold#549; reading the open pull requests
first found no duplicate of it or of storytold#463, and found that the Animations switch
on the Options page is already offered by someone else (storytold#504), so the fork does
not offer it.

Checked: 50 fork UI tests, fmt, clippy, wasm, layers; the pixels of a 150%
render read against the capture. The UI crate's one failure is upstream's own
French catalog test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arcanii and others added 4 commits October 13, 2026 07:20
Brings in upstream main (0.6.1), which fixes the two CSV tests this
branch failed CI on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the branch up to upstream's main (132 commits). Two conflicts, and
one thing the merge needed that was no conflict:

- crates/ui-egui/src/i18n/fr.rs: upstream rewrote the French catalog's
  lines this change sits among. Upstream's lines are kept, and the ten new
  entries are put back where they were, with the plain apostrophe the
  catalog now uses.
- docs/ui-parity.md: both changes are of the same day. Both rows of the
  history are kept, and the heading line names this change.
- crates/ui-egui/src/i18n/sr.rs: upstream gained a Serbian catalog, and
  every string must be in every catalog. The ten new strings are given
  their Serbian (Latin script, as the catalog is). Weeks, months and years
  are shortened, as in the Russian catalog: their endings change with the
  number.

Gate: all eight steps, 1415 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the branch up to upstream's main (180 more commits). One conflict,
and one thing the merge needed that was no conflict:

- docs/ui-parity.md: every line of both sides is kept, as upstream's own
  merges keep them (its heading has three lines now); this change's
  heading line and history row come first.
- crates/ui-egui/src/i18n/pt.rs: upstream's Portuguese catalog gained a
  "Yesterday" of its own, with the same word ("Ontem"). The one this change
  added is left out: a second arm for the same text is unreachable.

Gate: all eight steps, 1548 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the branch up to upstream's main (59 more commits). One conflict:

- docs/ui-parity.md: every line of both sides is kept, as upstream's own
  merges keep them, in the order of their dates, newest first (upstream
  has a change of the 13th now, which goes above this one of the 12th).

Gate: all eight steps, 1580 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 13, 2026
# Conflicts:
#	docs/ui-parity.md
@echelon

echelon commented Oct 13, 2026

Copy link
Copy Markdown
Member

Merged — thank you @arcanii for the contribution!

I merged main into your branch to resolve conflicts with PRs that landed first.

If you haven't already, come join us on Discord: https://discord.gg/artcraft

@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit fefe3a0 into storytold:main Oct 13, 2026
1 check passed
arcanii added a commit to arcanii/DevCraft that referenced this pull request Oct 13, 2026
…erved the program built from its files, and a loader of GridCraft's own

Phase K3 of the C kit (ADR-0001), the next task the owner named.

- A C project has a panel, and the panel is where its program runs. The
  kit has nothing left that it tells the person it can't do.
- Beside a C project's page GridCraft serves two things that are not the
  project's files, under every check the page itself is served under:
  program.wasm, the program kept under the fingerprint of the files the
  project holds at that request, which is as the person trusts them, and
  no other (none built from them: 404); and program.js, the loader. A
  program built from other files is never handed out, also for a project
  the person lets follow its changes. A first-kit project keeps its own
  files of those names.
- The loader hands the program a clock, a place to print, random numbers,
  its arguments and files kept in memory, and nothing else. What the
  program does with the workbook, its page does for it through
  spreadsheet. It is JavaScript as text in Rust source, the fork's fourth
  such exception, generated from the text that was tried in Node and in a
  browser. One change since: a refusal is said in GridCraft's own words.
- The C starter has a panel that runs the program and shows what it
  printed. It asks for nothing.
- A project's part of the Development window says of its panel and shows
  it: Dock Panel and Open in Browser, for a trusted project of either kit,
  by hand only. In GridCraft's own window and in the page, which was built
  again for it.
- An agent is told what a C project holds, and how a page uses CProgram.

Seen, in an isolated copy with zig named there: the starter built from
the page's Build button and running in its panel docked beside the sheet
("Hello from blink."), the first C program seen there; a changed project
given no program until it is trusted and built again; the panel docked as
GridCraft starts.

Not seen: Doom, or a program that uses files, in the docked panel; Open
in Browser pressed in the app; GridCraft's own Development window, whose
buttons only the tests press.

Also in the roadmap: a row for the C kit in what the fork carries, and
storytold#463 as merged.

Gate: eight steps, 1595 tests, with a zig named so the build tests build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arcanii added a commit to arcanii/DevCraft that referenced this pull request Oct 13, 2026
…k's hooks, and the outline drawn with upstream's outline_bands

Upstream 84acf62, 407 commits since the merge before, and no release among
them (still 0.6.1): AutoComplete for cell values with its switch on the
Options page, a horizontal scrollbar in the sheet tab bar and an All Sheets
navigator, rows that grow to their tallest font, the recent list's
"modified" column (the fork's own storytold#463, now upstream's), a selection
outline that keeps its sides round a whole column, many fixes to XLSX and
XLS round trips, number formats, functions and PDF output, and Serbian as
an interface language.

Two conflicts, both settled as the fork's rule says: upstream's code, and
the hook put back.

- crates/ui-egui/src/lib.rs, UiState and its Default: upstream added
  `autocomplete` on the line the fork's field stood on. Upstream's first,
  the fork's `aniefork` after it.
- crates/ui-egui/src/grid.rs, paint_selection: upstream replaced its
  stroked rectangle with four filled sides cut to the screen
  (`outline_bands`, its storytold#767), where the fork's hook stands. The hook
  stays, and the fork's `selection::paint_outline` now draws its own ring
  with `outline_bands`: where the outline lies and how wide it is are
  still the fork's, and it has upstream's fix. Nothing else in the app
  calls that function, so without this the build fails on an unused one.

Every hook is in place after the merge, counted file by file before and
after. Outside the fork's own files the result differs from upstream by
the hooks alone: 72 lines added and 17 changed, in ten files.

Checked on the result: fmt, clippy, all 1867 tests of the workspace,
assets, layers, wasm, parity and keytips. The keytips step failed in the
gate's own run on line endings only (the merge checked the generated
table out with CRLF and the check compares bytes); regenerated, it is
upstream's file to the byte, and the step passes.

ROADMAP-aniefork.md has the sync table, the hooks table, what conflicted,
and the log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants