Repository navigation
feat(pages): technical names for application pages (step 5, separable) - #50
Open
rubenvdlinde wants to merge 1 commit into
Open
rubenvdlinde wants to merge 1 commit into
rubenvdlinde wants to merge 1 commit into
Conversation
Every page gets a required technical name, unique within its application: start pages are "dashboard", new pages get one from their title unless one is given. Existing pages are backfilled. The page API accepts and returns it and answers 400 for an invalid or taken name. Importing a scheme into an application updates the page with the same technical name and adds the others; a user migration import names its pages uniquely. Separate from nextcloud#3100 so it can be left out upstream. Assisted-by: ClaudeCode:claude-opus-5-5
This was referenced Oct 16, 2026
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.
Step 5 of the page rework (follows the review on nextcloud#3075). Our own ask on top of nextcloud#3100, kept separate so upstream can leave it out. Stacked on #49.
What
tables_contexts_page.technical_name: required, unique per application (tables_ctx_page_name_uqoncontext_id, technical_name). Two migrations: add the column and backfill (start pagesdashboard, other pages from their title, elsepage_<id>, duplicates get_2,_3), then make it NOT NULL and unique. App version 2.4.0-dev.6.TechnicalNameHelpercarried over from the earlier stack.POST .../pagesandPATCH .../pages/{pageId}accepttechnicalName; a new page without one gets one from its title. Pages returntechnicalName. 400 for an invalid name (^[a-z][a-z0-9_]*$, at most 200 characters) or one another page of the application uses, also when a concurrent write hits the unique index.dashboard.scheme/importtakes the scheme'spages; a page updates the application's page with the same technical name (title, emoji, description, widgets replaced, sources remapped through the node UUIDs), other pages are added, pages the scheme does not name stay. The user migration import names its pages uniquely.Tests
tests/unit/Helper/TechnicalNameHelperTest.php:OK (14 tests, 20 assertions)tests/unit/Migration/Version2400Date20261016000002Test.php(backfill):OK (3 tests, 4 assertions)tests/unit/Service/PageServiceTest.php:OK (32 tests, 86 assertions)(generated, given, invalid, taken, unique-index race, own name kept)tests/unit/Service/ContextPagesRoundTripTest.php(real DB, incl. naming on import and scheme pages matched by technical name):OK (4 tests, 18 assertions)tests/unit/Controller/ContextPageControllerTest.php:OK (13 tests, 23 assertions);tests/unit/Db/ContextMapperTest.php:OK (1 test, 5 assertions)OK (445 tests, 904 assertions)dashboard,overview,shared_overview, ...), column NOT NULL with the unique index.npx playwright test playwright/e2e/context-grid-pages.spec.ts --timeout=120000(1600 px):6 passed (1.3m), incl. a generated name and a 400 for a taken name.composer cs:check: no files;psalm: no errors;npm run lint: 0 errors, 1 inherited warning (src/store/store.js:176);npm run stylelint: clean.Prepared in the Conduction fork for porting upstream by @remko48. Prepared with Claude Code.