owncloud / owncloud/web-extensions

web-app-ai-smart-collections-nav: cache recent-files/collection results across mounts

Open
#504 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
16
Forks
11
Avg merge
1d 14h
Merged PRs (30d)
23

Description

Summary

CollectionsView.vue re-runs the full pipeline — space fan-out (useRecentFiles), per-file excerpt fetch, and LLM clustering (useCollections) — from scratch on every mount (onMounted(loadAndCluster)). There is no caching of the resulting recentFiles/collections, so navigating away from the Collections view and back pays the full IO + LLM cost again.

This is in contrast to the session consent flag (useConsent.ts), which is cached at module scope for the lifetime of the SPA session.

Proposal

Cache the last successful recentFiles/collections result at module scope (or in a small composable), consulted on mount to skip the fan-out/LLM call when a cache is warm, with an explicit "Refresh" action in the UI to invalidate it and re-fetch.

Context

Raised in the automated review on #498 (verdict: "Commenting", non-blocking) as a real but non-correctness/non-security inefficiency. Deferred out of that PR as a follow-up; the other eight findings from that review (prompt injection, batch-failure data loss, masked outage, consent-gating test coverage, dependency drift, stray .gitignore entries, placeholder description, and the inefficient excerpt fetch) were addressed directly in #498.

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

Start with CollectionsView.vue and trace onMounted(loadAndCluster), useRecentFiles, and useCollections to understand the current fan-out, excerpt fetch, and clustering flow. Check useConsent.ts for the module-scope caching pattern. Done means warm navigation skips the pipeline, an explicit Refresh invalidates the cache and reloads, and the existing Collections view behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.