Skip to content

Fix the findings of the resource framework review - #148

Merged
aevnsvi merged 16 commits into
mainfrom
review-fixes-framework
Nov 21, 2026
Merged

aevnsvi merged 16 commits into
mainfrom
review-fixes-framework

Conversation

@aevnsvi

@aevnsvi aevnsvi commented Nov 21, 2026

Copy link
Copy Markdown

Fixes found while reviewing the framework screens, the entity layer and the end-to-end support. Each change is its own commit and, where it can be tested, the test came first and failed on the unchanged code.

Application

  • A list page past the last page (the last row of the last page deleted, a bookmarked address, objects removed by someone else) said "No repositories yet" or "No remotes yet", because the empty state followed the rows of the page and not the count the server reports. It now follows the count, and an address past the end moves to the last page that has rows by replacing the address, so Back does not return to the empty page.
  • The repository create form sent and navigated with the name as typed, while the server stores it trimmed. A trailing space created the repository and then opened a page that does not exist; the duplicate check for the distribution also missed. The name is trimmed once where it is read, as the remote form does.
  • The object permission hook reported "ready" while the index of roles on single objects was read again from empty (the same user signing in again), so every object looked refused for the length of the read. It is ready only when no read runs. It also reports an error, instead of loading for ever, when the signed-in user has no address of their own.
  • The refused roles list no longer starts the who-is-signed-in check for every GET of that address, only for the request that asks for it: the permission index probe marks its request with a header the request policy removes before the request leaves the browser. The roles screen and the role pickers have their refusal checked again. The probe keeps its behaviour (no repeated sign-in read for a limited account) and its tests.
  • A repository or remote named "." or ".." built a link the browser resolves to the parent route. Percent encoding does not help (%2E is resolved as a dot segment too), so those two names are escaped twice: the address keeps one literal segment and the object is reported as not found under that text.
  • The bounded runners throw a RangeError for a limit below one instead of resolving with an array of holes.
  • The task links of a delete outcome fall back to the plain word when the address holds no task id, instead of throwing during render.
  • The descriptor forms no longer take an onSubmit that was documented as "Enter sends the form" and could never be reached; Enter is swallowed and sending is only through Save.
  • With rows ticked that the user may not act on, the bulk toolbar vanished including the count. The count stays with a short note (translated into es, fr, nl, ja, ko, zh).
  • Reading repositories in chunks sends each address once, as the other entities do.

End-to-end specs

  • The bulk spec waits until the rows shown are exactly the repositories it made, all under its own prefix, before select all followed by Delete or Sync, so a filter that did not apply can never reach the seeded lab repositories.
  • Parallel creates of the bulk spec are all awaited before the first failure is rethrown, so no object is registered after the clean-up; the clean-up of the bulk and sync progress specs no longer hides the first failure with a second one.
  • The scale spec handles both timing waits whatever the trigger does and derives the UI root of its moves from the configured base URL.

Checks: lint, the unit and integration tests, the build, the bundle budget and the public content guard pass locally. The changed bulk, sync progress and scale specs were run against a test deployment of the previous build.

A repository or remote list decided "no objects yet" from the rows of the
page. A page beyond the last one (deleting the last row of the last page, a
bookmarked address, objects removed by someone else) has no rows but the
server still reports the real count, so the screen claimed nothing existed.
The empty state now follows the count, and an address past the end moves to
the last page that has rows by replacing the address.
The create form sent and navigated with the name as typed, while the server
stores it without surrounding white space. A name with a trailing space was
created but the screen then opened a repository that does not exist, the
duplicate check for the distribution missed the stored name, and the default
base path was derived from the untrimmed text. The name is trimmed once where
it is read, as the remote form already does.
After the same user signs in again, the index of roles on single objects is
read again from an empty answer. The hook kept reporting "ready" because the
earlier read had succeeded, so every object looked refused for the length of
the read and screens showed "no permission" instead of loading. The state is
ready only when no read of the index is running.
… is the answer

The refusal of a roles list read skipped the who-is-signed-in check for every
GET of that address, so a refusal in the roles screen or a role picker on a
backend that answers an ended session with 403 never opened the sign-in
dialog. The skip is now an explicit opt-in of the one request that wants it,
the permission index probe of what an account may read, by a marker header the
request policy removes before the request leaves the browser. Every other read
of the roles list has its refusal checked again.
A repository or remote named "." or ".." produced a link such as
/file/repositories/../ that the browser resolves to the parent route, so the
object could not be opened and the link went to another screen. Percent
encoding does not help (%2E is resolved as a dot segment too), so the two
names are escaped twice: the address keeps one literal segment and the
object is reported as not found under that text.
A limit of 0, a negative number or NaN started no worker, so the run resolved
at once with an array of holes and never called the job, which callers read as
"nothing found". Both bounded runners now throw a RangeError for such a limit.
…arts

The bulk spec created its remotes and repositories side by side with
Promise.all, so when one create failed the others were still running and an
object whose task finished after the clean-up had started stayed on the server
as a leftover that inflated the counts of later specs. The creates are now all
awaited before the first failure is rethrown. The clean-up of the bulk and
sync progress specs also no longer throws a second error that hides the first
when the API context could not be opened.
…ecting all

Select all followed by Delete or Sync acts on every row shown, and the specs
only waited for the rows of the filtered address to load. A filter that did
not apply (a renamed parameter, a stale cached list) would have shown the
first page of the lab and the spec would have deleted or synced seeded
repositories. Each spec now waits until the rows shown are exactly the
repositories it made, all under its own prefix, before anything is selected.
The in-application move cut the root off the page's own path at the first
"/ui/", which is -1 when the application is served from another root and then
pushed a nonsense address, so the failure only showed later as a missing
table. The root is now taken from the configured base URL and a page outside
it fails at the move.
The scale spec started two waits for the table before the click or the move
that asks for the screen and awaited them afterwards. When the click threw,
the waits were left without a handler and rejected unhandled when their
timeout ran out, adding a second and misleading failure and, in a serial run,
sometimes failing the next test. One helper now starts both waits, settles
them whatever the trigger does and rethrows the first failure.
…ask id

The delete report built every task link with formatPath, which throws for a
task address without an id and would have unmounted the dialog or the alert
that renders it. Such an address is now shown as the plain word, as the other
task links of the application do.
… had

DescriptorForm took an onSubmit and documented that Enter sends the form, but
no form has a submit button and the forms have several text inputs, so the
handler was never reached. A future form with one text input would have sent
without the checks that guard the Save button. The prop is gone: Enter is
swallowed, and sending is only through the screen's Save button.
With rows ticked that the user may not act on, the bulk toolbar vanished
including the count, so the check boxes stayed ticked with no explanation. The
count now stays and a short note says that no bulk action may be taken on the
selected rows.
The chunks of the other entities drop repeated addresses, the repository one
passed them on as given, so a repeated address used up request length and made
the read ask for more rows than there are distinct addresses.
The object permission index reads the roles of the signed-in user by their
address. A session user without one never had the read started and the hook
stayed loading for ever, so a screen waiting on it spun without end. It now
reports an error, as the global permission read already does for the same
condition.
@aevnsvi
aevnsvi merged commit ebe32be into main Nov 21, 2026
6 checks passed
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.

1 participant