Repository navigation
Conversation
Creating or updating an application (context) can now set its menu. The menu items are validated at the controller boundary, and invalid input is answered with a 400 instead of a 500. - every save replaces the whole menu inside the same transaction as the rest of the update - the views and tables the menu opens become nodes of the application, with read permission, so everyone it is shared with can open them; the owner must be able to manage them - a menu item without a technical name gets one derived from its label, with a numeric suffix when the menu already uses it - only http and https links are accepted Co-authored-by: Ruben van der Linde <[email protected]> Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Remko <[email protected]>
…hnical names - a new menu target that does not exist gets the same refusal as one the owner cannot manage, so a save reveals nothing about others' ids; a target that was already in the menu is kept and marked broken - an item sent without a technical name keeps the name stored for the same target, so renaming or reordering no longer changes it - removing a menu item keeps its view or table as a resource, as documented - the start page mock gets an id, which PHP 8.5 needs for the array key - a javascript link with a host is tested, which only the scheme check stops - the menu list is mapped with a first-class callable Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Remko <[email protected]>
The update runs in one transaction since the menu is saved with it. On SQLite a concurrent request can take the write lock between its read and its write, and the update then failed at once with a 500. It now runs again on a retryable database error, as atomicRetry() does in core. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Remko <[email protected]>
0299c48 to
80b1262
Compare
80b1262 to
02fa6ad
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
|
Closing this in favour of the new stack that starts at #3131. After the review on #3075, @enjeck's design in #3099 and #3100 replaced the model these PRs were built on, so they can't be updated in place. The backend of grid pages and application menus is now in #3131 to #3138. The frontend follows in separate PRs. @remko48 is co-author on the menu commits there. Thanks to everyone who reviewed these. |
Applications (contexts) can now save their menu:
createandupdatetake amenuItemslist that replaces the whole menu.What changes
MenuItemInput): every item is validated before the service is called; an invalid item returns a 400.view,tableorurl(urlwhen left out)httporhttpsaddress with a host, at most 2000 charactersmenuItemsreplaces the whole menu; leaving it out keeps the stored menu. The order of the list is the order of the menu.broken. Removing a menu item leaves its view or table in the application as a resource.menuItemsis added to the create and update endpoints (OpenAPI and TS types regenerated).🖼️ Screenshots
Backend only, no UI changes.
🏁 Checklist
/backport to stableX.X🤖 AI (if applicable)