Skip to content

feat(contexts): save the menu of an application - #3136

Draft
rubenvdlinde wants to merge 2 commits into
feat/noid/app-menu-modelfrom
feat/noid/app-menu-saving
Draft

rubenvdlinde wants to merge 2 commits into
feat/noid/app-menu-modelfrom
feat/noid/app-menu-saving

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Oct 22, 2026 •

Copy link
Copy Markdown

Part of #3099, on top of #3135 (menu model). Creating and updating an application can now include its menu. This replaces #3087 by @remko48.

Size: 1642 lines: 609 code, 865 tests and 168 generated OpenAPI.

What changes

  • Saving replaces the whole menu, in the same transaction as the application.
  • Links must be http or https, without spaces or control characters.
  • At most 200 items per application. Updating an application that carries a menu is limited to 60 a minute per user; updates without a menu aren't limited.
  • A page target must be a page of the same application, otherwise 400. When you create an application, a page item without a page id means its new start page.
  • The default menu. If you create an application without sending a menu, it gets one item, "Dashboard", that opens the start page. If you do send a menu, even an empty one, it's stored as you sent it. As Grid pages in applications (frontend) #3099 says, the Dashboard item is an ordinary item: it can be renamed, moved or removed. This differs from what we wrote on feat(views): allow views without a table #3075.
  • A stored item whose page is gone stays in the menu and stays marked as broken when you save other changes. Only a new item that points at a missing or foreign page is refused.
  • Tables and views in the menu become part of the application, after the same permission check as adding them to the application directly. A table that's both in nodes and in the menu is added once.
  • The create and update responses keep exactly the shape they have on main; only menuItems and the new page fields are added.
  • Invalid input when creating an application now gives a 400 instead of a 500.

OpenAPI and the TypeScript types are regenerated.

How it was tested

On Nextcloud 34 with PostgreSQL:

  • MenuItemInputTest: labels, links, targets, technical names
  • ContextServiceTest: saving, the default Dashboard item, page targets, broken items kept, the item_<id> default
  • ContextControllerTest and ContextPagesRoundTripTest (database: a table in both nodes and the menu is added once, on create and on update; the response shape stays as on main)
  • the full unit suite on the top of the stack (feat(contexts): carry the menu through export and import #3138), on PostgreSQL and SQLite: 665 tests
  • composer cs:check, psalm and rector, all clean

🖼️ Screenshots

Backend only, no UI changes.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stableX.X
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@rubenvdlinde
rubenvdlinde added this pull request to stack #3139 October 22, 2026 11:42
@rubenvdlinde
rubenvdlinde force-pushed the feat/noid/app-menu-saving branch from 6540b64 to b167dd6 Compare October 22, 2026 13:25
@rubenvdlinde
rubenvdlinde force-pushed the feat/noid/app-menu-saving branch from b167dd6 to 85b998e Compare October 23, 2026 08:05
rubenvdlinde and others added 2 commits October 24, 2026 10:09
Creating and updating an application can include its menu, saved as a
whole. Links must be http or https, page targets must be pages of the
same application, and tables and views in the menu become part of the
application. A new application without a submitted menu gets a
Dashboard item that opens its start page.

Co-authored-by: remko48 <remko@conduction.nl>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
@rubenvdlinde
rubenvdlinde force-pushed the feat/noid/app-menu-saving branch from 85b998e to 9247115 Compare October 24, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants