Skip to content

feat(overview): add a Starred filter to the file list - #127

Open
karlitschek wants to merge 1 commit into
mainfrom
feat/starred-filter
Open

feat(overview): add a Starred filter to the file list#127
karlitschek wants to merge 1 commit into
mainfrom
feat/starred-filter

Conversation

@karlitschek

Copy link
Copy Markdown
Member

What

Favourited files could only be spotted by their star, one row at a time. This adds a "Starred" filter alongside All / Mine / Shared with me that narrows the list to favourites — surfacing them as a section of their own.

While Starred is active, the section heading reads "Starred {category}" instead of "Recent {category}", so it reads as a starred view rather than just a filtered one.

How

Reuses what's already there:

  • The oc:favorite flag is already fetched (it drives the star indicator), so no new request — just a new filterFiles case (favorite === 1, regardless of owner).
  • The pill is the same NcButton pattern as the other filters, with aria-pressed state, plus the star glyph for recognition.

Notes

  • New filterFiles > starred spec cases (favourited-only, across owners; excludes unfavourited).
  • No view-spec changes needed — nothing asserted the heading, and the existing button-by-text lookups are unaffected.
  • Source onlyjs//css/ still need a maintainer /compile.
  • Verified on a dev instance: Starred shows only the favourited file, the heading switches to "Starred …", and the pill reflects the active state.

🤖 Generated with Claude Code

Favourited files could only be spotted by their star, one row at a time.
Add a "Starred" filter alongside All / Mine / Shared with me that narrows
the category to favourites — the oc:favorite flag already fetched for the
star indicator — regardless of owner. While it is active the section
heading reads "Starred {category}" instead of "Recent {category}", so the
list reads as a starred section rather than just a filtered view.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com>
@moodyjmz

Copy link
Copy Markdown
Contributor

TL;DR: Filter logic is correct and well-tested; the view-level wiring that actually surfaces it isn't. One additional low-severity UX gap in the escape hatch for large result sets.

Findings and proposed fixes

1. OfficeOverview.vue's new button and heading are untested (medium)

OfficeOverview.spec.ts is untouched by this commit. Nothing currently fails if the new "Starred" button were deleted, wired to the wrong filter value, or the heading text were wrong — findButtonByText is exact-match and no test asserts button count or heading text. The underlying filterFiles() logic is solidly tested; the gap is specifically in the component wiring around it. Suggest a test mounting the overview with a mix of starred/unstarred files, clicking (or setting) the Starred filter, and asserting both the filtered result and the "Starred {category}" heading text.

2. The "show all in Files" escape hatch ignores the active filter (low)

The overview's DAV search is capped at 500 results (SEARCH_RESULT_LIMIT), so "Starred" only searches the 500 newest office files — an older favourite outside that window won't show up here. That's an existing constraint shared with mine/shared, but for those filters openInFiles()'s fallback (linking to /apps/files/recent) at least lands somewhere plausible. For "Starred" specifically, a user hitting the cap has no path to see their older starred files — openInFiles() always links to /apps/files/recent, not a starred-filtered Files view, so the fallback doesn't actually answer the problem for this filter. Not asking to fix the 500-item cap here — just noting the escape hatch is a dead end specifically for this filter, worth a follow-up if it's not already covered by #99.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants