nextcloud / nextcloud/notes

Dashboard frontend uses old controller endpoint not the actual DashboardWidget implementation

Open
#1,885 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature: dashboard technical debt
Dominant language
JavaScript
Stars
738
Forks
162
Avg merge
6h 2m
Merged PRs (30d)
35

Description

Was about to do some performance optimization of the hot paths in the item querying logic in the widget then I noticed something:

https://github.com/nextcloud/notes/blob/91912ec40b05705f5fa714c2f6ef857480e5e91e/src/NotesService.js#L63-L74

The dashboard widget is registered through DashboardWidget, but the rendered frontend still uses the old controller endpoint via the JS dashboard app. So DashboardWidget is not the sole implementation; it is the integration point, while NotesController::dashboard() is the data backend for the actual dashboard UI.

So we have two divergent implementations:

https://github.com/nextcloud/notes/blob/91912ec40b05705f5fa714c2f6ef857480e5e91e/lib/Controller/NotesController.php#L114-L142

https://github.com/nextcloud/notes/blob/91912ec40b05705f5fa714c2f6ef857480e5e91e/lib/AppInfo/DashboardWidget.php#L80-L113

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read src/NotesService.js around lines 63-74, then compare the dashboard paths in lib/Controller/NotesController.php lines 114-142 and lib/AppInfo/DashboardWidget.php lines 80-113. Determine which implementation the rendered dashboard frontend should use and how the divergent logic can be consolidated. Done means the dashboard no longer relies on separate, inconsistent implementations.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
backend, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.