Repository navigation
feat(rows): list rows on api/2 with filter, sort, search and paging - #63
Draft
rjzondervan wants to merge 143 commits into
Draft
rjzondervan wants to merge 143 commits into
rjzondervan wants to merge 143 commits into
Conversation
[skip ci] Signed-off-by: Nextcloud bot <bot@nextcloud.com>
An application receives its tables and views as a list of nodes. Add ContextNodeInputSet and ContextNodeInput to turn that request parameter into a normalised list. It has to be a list of objects whose id, type, permissions and order are integers, or strings of digits as form encoded requests send them, within the range of the 32-bit columns they are stored in. Missing permissions default to read. Anything else is rejected with an InvalidArgumentException instead of being cast. Nothing uses the value objects yet. Refs: nextcloud#3262 Assisted-by: ClaudeCode:claude-fable-5-2 Assisted-by: Codex:gpt-6.1-sol Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
PUT /api/2/contexts/{contextId} passed its nodes parameter to the
service nearly unchecked. A new node without permissions, a node that
is kept without permissions, or an object in place of the list made the
request fail with a 500, in part after earlier changes of the same
request were written.
Parse the nodes into a ContextNodeInputSet before the service is
called. Missing permissions now default to read, as they do when an
application is created, and that includes the nodes that are kept.
Nodes that are not a list, or that carry values other than integers,
are answered with a 400 before anything is written.
A JSON object whose keys count up from zero cannot be told apart from
a list once the request body is decoded, so it is still accepted.
Refs: nextcloud#3262
Assisted-by: ClaudeCode:claude-fable-5-2
Assisted-by: Codex:gpt-6.1-sol
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
POST /api/2/contexts shared its node handling with the update endpoint. A node without an id or type was answered with a 500, although the endpoint documents a 400 for invalid parameters, and other values were cast to integers without a check. Use the same ContextNodeInputSet as the update endpoint and drop sanitizeInputNodes(), which has no caller left. Creating an application is therefore stricter as well. Nodes given as an object rather than a list, floats, booleans or arrays in place of an integer, negative values and values beyond the 32-bit range were accepted so far and are now answered with a 400. Refs: nextcloud#3262 Assisted-by: ClaudeCode:claude-fable-5-2 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
The nodes parameter of PUT /api/2/contexts/{contextId} was documented
as a single object with four required properties. The endpoint takes a
list of nodes, in which permissions and order are optional.
Regenerate openapi.json and the TypeScript types.
Refs: nextcloud#3262
Assisted-by: ClaudeCode:claude-fable-5-2
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
Every icon button was labelled 'Select icon for the application'. Label each one with its translatable icon name instead. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: AhmadAnzar <177634035+AhmadAnzar@users.noreply.github.com>
An application update set the permissions of a node it kept to read when the request did not state them, although they are optional. A client that only reorders the nodes would thereby remove the write permissions of every node. Leave missing permissions out of ContextNodeInput and let the service decide: a node that is kept keeps its permissions, a node that is added gets read. Creating an application is unchanged, as the service already defaults missing permissions to read there. The scheme import calls the same update, so a node without permissions in an imported scheme follows these rules as well. It made the import fail before. Refs: nextcloud#3262 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
Name each icon by what it depicts, with a translator hint per string, so names do not collide with existing strings. Do not HTML-escape the icon name in labels, and show it as a tooltip. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: AhmadAnzar <177634035+AhmadAnzar@users.noreply.github.com>
[skip ci] Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…phar-6.x chore(deps): update dependency psalm/phar to ^6.20.9 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ight-monorepo chore(deps): update dependency @playwright/test to ^1.65.0 (main)
…norepo fix(deps): update dependency vue to ^3.5.45 (main)
The permissions of a node were accepted as any integer within the range of the 32-bit column. Read is the base permission of a node in an application. The dialogs always grant it and only let create, update and delete be added on top, and without read the people the application is shared with cannot see the data of a node it lists. Bits beyond manage are not read anywhere. Accept only a bitmask of read, create, update, delete and manage that includes read, and answer other values with a 400. Manage stays allowed, as the permission checks honour it for applications. The scheme import and the user migration import do not pass through ContextNodeInput and are not covered by this check. Refs: nextcloud#3262 Assisted-by: ClaudeCode:claude-opus-5-5 Assisted-by: ClaudeCode:claude-fable-5-2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…phar-6.x chore(deps): update dependency psalm/phar to ^6.20.10 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…-monorepo chore(deps): update dependency eslint to ^10.14.0 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
fix(deps): update tiptap to ^3.33.0 (main)
Signed-off-by: GitHub <noreply@github.com>
…update-nextcloud-ocp [main] Update nextcloud/ocp dependency
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ice-phpspreadsheet-5.x fix(deps): update dependency phpoffice/phpspreadsheet to ^5.11.0 (main)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
build(vendor): mark phpoffice/wmf as a prod dep
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
chore(deps): update dependency vite to ^7.3.8 (main)
…t-phpunit-9.x chore(deps): update dependency phpunit/phpunit to v9.6.39 (main)
Signed-off-by: GitHub <noreply@github.com>
[skip ci] Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: GitHub <noreply@github.com>
…update-nextcloud-ocp [main] Update nextcloud/ocp dependency
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…fix-npm-audit [main] Fix npm audit
…ify-3.x fix(deps): update dependency dompurify to ^3.4.18 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…phar-7.x chore(deps): update dependency psalm/phar to ^7.6.0 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…-rector-2.x chore(deps): update dependency rector/rector to ~2.8.5 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…rse-5.x fix(deps): update dependency papaparse to ^5.7.1 (main)
…uter-5.x fix(deps): update dependency vue-router to ^5.5.1 (main)
…al-symbols-svg-400-0.x fix(deps): update dependency @material-symbols/svg-400 to ^0.49.0 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ce-4.x fix(deps): update dependency debounce to v4 (main)
Upstream continues with nextcloud#3229 for the row uuid, so take out the net change of nextcloud#3253 (the diff from its merge base with main to b5977db). The single-row GET and the uuid addressing of the row routes go with it. The row listing keeps the node helpers it uses. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
The row uuid of nextcloud#3229: column with a unique index, set on insert, backfill job, kept on user-migration import, uuid in TablesRow. It brings main up to 466339b and the version 2.5.0-dev.1. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The revert of nextcloud#3253 took findViewOrFail() with it, which the listing uses, so it comes back as a private helper. The tests construct RowService without the IDBConnection that nextcloud#3229 dropped and with the RowQueryResolver the listing added. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
Compare each listed row's uuid with the uuid of its row sleeve, so a wrong or freshly minted uuid fails the test, and check the RFC 4122 variant next to the version. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
rjzondervan
commented
Dec 2, 2026
rjzondervan
commented
Dec 2, 2026
rjzondervan
left a comment
Member
Author
There was a problem hiding this comment.
Verdict: APPROVE (delta re-review, Standard)
Delta since 71cdd25: the round-3 fix, the main merge and its psalm fix, the nextcloud#3253 revert, the merge of nextcloud#3229 (01a3567) and the listing rebuilt on it. uuid is still refused as a filter/sort field; listed rows carry nextcloud#3229's uuid (null when federated).
Context: the stack moved off nextcloud#3253 (closed) onto nextcloud#3229 and follows the maintainer rule on nextcloud#3093: no row uuid addressing on normal endpoints; row ids only, uuid only as data.
🟢 Minor
- The uuid test proved pass-through, not the stored uuid — fixed in daa3a27, resolved.
🟡 Concerns
- PR description is stale: it still says "Depends on nextcloud#3093 (row uuids)" and describes the base as feat/3093; the branch now merges nextcloud#3229.
Context
- Unit tests 794 OK on MySQL and PG16.
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.
Internal review draft. This PR exists only to run the review skills on the fork before the upstream PR is opened. The base
review-base/3095isfeat/3093/row-uuidat b5977db, the head of nextcloud#3253, so the diff shows only this PR's own commit. The upstream PR description will be written separately.Refs nextcloud#3095. Depends on nextcloud#3093 (row uuids).
Changes
GET /api/2/{tables|views}/{nodeId}/rowsreturns a page of rows as{results, total, limit, page, pages}.pageoroffset,limit(default 25);sortby technical name, column id or meta field;fieldsto pick columns.searchover text cells and selection labels.filter[field]=valueorfilter[field][operator]=value, with the operators of the view filter. Without an operator a filter checks equality, or on multi-value columns whether the value is one of them.@meonly work in the view's own filter.page,offsetandlimitmust be integers in range; a page whose offset does not fit gives a 400.filteris a deep object in the query string; the generated openapi shows it as a string because the generator cannot describe nested query parameters, and its description spells out the format.RowListQuery(parsed request) andRowQueryResolver(field and operator resolution);Row2MapperandRowService::findPagedo the paged query. openapi.json and openapi.ts regenerated.Checks run locally
T, seconds, labels,yes) give a 400.RowServicetakes bothRowVisibilityService(from main via UUIDs for rows nextcloud/tables#3093) andRowQueryResolver.Benchmark (issue acceptance criterion)
MariaDB, the 100k-row benchmark table (30 columns: 10 text, 6 number, 6 selection, 4 date, 4 usergroup, with the nextcloud#3092 indices), via the API as the owner, median of 7 requests [min–max], response time including the total count:
Paging, filters and sorting stay well under a second, also deep in the table. Search does not: it is one OR group per searchable column (10 text columns plus the matching selection options), each a subquery over the table, run for the page and again for the count. As the issue says, a better search follows separately; the search index of nextcloud#3207 addresses this. A single combined subquery is not the answer on MariaDB: written by hand it did not finish within 10 minutes.
Follow-ups (not in this PR)
Row2Mapperincludes rows without a value in a datetime column foris-lower-than(and the other comparisons), because the default-value check reads the column's number default, which is null for datetime columns. That predates this PR and affects view filters as well.AI assistance: Claude Code (claude-opus-5-5) was used for implementation and testing; commits carry
Assisted-bytrailers.🤖 Generated with Claude Code