Clear Recent Commands (help.clearRecentCommands) now empties the pick
counts that rank the results, with the recent list and the saved ids.
command_list reports it as enabled while a pick or a count is saved.
- A pick from the search is counted when Recent Commands records it,
before it runs, so a pick of Clear Recent Commands is cleared with
the rest and is not counted afterward. A refused pick puts the counts
back as it puts the list back.
- The command's params text, docs/mcp.md and the two lines in
docs/target-app-parity.md say so; crates/mcp/src/ui_catalog.rs
carries the same params text.
- Test: clear_recent_commands_also_clears_the_pick_counts.
Reading the saved counts keeps at most the 200 most recent picks as it
goes, instead of collecting every entry and sorting them before cutting
the list to 200. The counts that load are unchanged.
A pick is now counted only when Recent Commands records it: a refused
pick and a pick of Search Commands… are not counted, and a pick that
opens a dialog is. The test that counts an effect pick picks it with
art selected, since the effect is dimmed when nothing is selected.
The test asserted only the recent list, which already held the effect,
so a refused second pick would also have passed. It now checks that the
effect's dialog opens.
The search icon can open the palette again before the next frame draws it
closed, so the highlight kept from before the close survived and Enter on
an empty search ran that row instead of the last pick. A palette that
closes now forgets its highlight in the same frame.
A pick is recorded in Recent Commands before it runs again, as before
the last commit, so a command that changes the list sees it with the
pick already in it. When the pick is refused, the list goes back to
what it was.
- A tool pick that fails shows the error in the status line and counts
as refused, so it is not recorded.
- A pick whose menu item is dimmed but that still opens a dialog counts
as opening it and is recorded.
- The outcome test also covers a dimmed effect, a dimmed plug-in
filter, a panel the docking layout can't show and a tool that can't
be chosen.
- The French help line reads "Tapez pour rechercher des commandes, des
outils, des panneaux et des effets", like the other palette rows.
An empty search lists up to eight recent picks under a Recent heading.
With no picks yet it shows a dimmed line, "Type to search commands,
tools, panels and effects", with a row in every catalog. The Recent
Commands button's list also shows up to eight picks, and the saved
list holds at most 20 ids.
A pick now reports whether it ran, opened a dialog or was refused.
Only a pick that ran or opened a dialog is recorded in Recent
Commands, so a canceled dialog's command stays there. A pick that is
refused because its menu item is dimmed, or because its panel can't be
shown in Presentation Mode, is no longer recorded; a refused recent
pick keeps its place.
As the first recent pick, the palette's own toggle made Enter on an
empty search close the palette and open it again. A pick of it is no
longer recorded, and one saved earlier is not listed.
- The rows of the empty search's list take the room the result count
used to take, and the No recent commands line keeps the count's
spacing.
- The palette tests' list of shown results follows the empty search.
- Tests: the toggle is not recorded or listed; a click on a lower
recent pick runs it and moves it first.
When all 200 counted commands had 2 picks or more, each new command
entered at 1 pick and the next new command removed it, so it could not
build up a count. A new command now removes one of the 100 commands
picked longest ago: the one with the fewest picks, of those the one
picked longest ago.
The palette now counts how many times each command is picked and ranks
the commands picked most often first among the results that match a
query as well as they do, also after they leave Recent Commands. A
count never lifts a result above one that matches the query better.
- Counts are compared in grades that double: grade 1 starts at 1 pick,
grade 2 at 3, grade 3 at 7, up to grade 9. A command picked once
ranks above the commands never picked. The grade ranks after the
match grades and before the place among the recent picks.
- At most 200 commands are counted. A new one then removes the command
with the fewest picks, of those the one picked longest ago. When a
count reaches 1,000, every count is halved and commands left at 0
are dropped.
- The counts are saved in ui.json as `command_uses`. A count above 999
loads as 999, an unreadable entry is dropped, and of more than 200
the most recent picks are kept. The web build keeps them for the
session.
- The kept ranking of the last query is ranked again when a count
changes.
main's gate fails french_catalog_uses_nonbreaking_prose_punctuation on
the "{pos} of {total}: {name}" row of fr.tsv, added by #8017, which has a
plain space before the colon. The row now uses U+00A0 there.
Open #8053 fixes three other rows that main already has right, so it
does not clear this failure.
Clear Recent Commands (help.clearRecentCommands) empties the picks that
an empty search and the Recent Commands list show, and the saved ids
with them. A pick of it in the search is not kept as a recent pick.
command_list reports it as not enabled while no ids are saved.
- The label has a row in every catalog that translates the Recent
Commands strings.
- crates/mcp/src/ui_catalog.rs is regenerated with cargo xtask
ui-commands.
- Docs: a Recent commands section in docs/mcp.md and a line in
docs/target-app-parity.md.
- Test: clear_recent_commands_empties_the_recent_picks.
A query word that is text inside a word of a result now counts as
matched when the other words match through a stem form, a word of the
same meaning, a typo or the description: "bg mov" finds Remove
Background. Before, such a word left the result out unless every word
was text in its names or ids. A word that is text inside some result's
names or ids also keeps the later words compared for typos.
A command listed in Recent Commands now ranks first among the results
that match a query as well as it does, the most recent first. It ranks
after the whole-query match, the word grades and the typo, description
and same-meaning matches, and before the kind of result and the name's
length, so it never passes a result that matches the query better.
After a pick of Effect › Convert to Shape › Rectangle…, "rect" lists it
above the Rectangle Tool, and Enter runs it again.
The ranking uses the list Recent Commands shows, which also holds a
pick whose command could not run. The kept ranking of the last query is
ranked again when the recent picks change.
With an empty search, or one of spaces only, the palette lists the picks
of the Recent Commands list under a Recent Commands heading, most recent
first, instead of the first commands of the catalog. The first row is
highlighted, so opening the palette and pressing Enter runs the last pick
again. With no picks yet the palette lists no results and shows a dimmed
No recent commands line in place of the result count.
Closing the palette forgets the highlighted result, so the palette opens
with its first result highlighted and its list scrolled to the top.
Before, a palette opened again on the same search kept the row that was
highlighted when it closed.
The held-Enter test of the shortcuts gives the app a recent pick, since
an empty search with none lists no result to run.