Repository navigation
Conversation
7878d19 to
f3fb3f2
Compare
f72dfaf to
5d5b995
Compare
|
Ah damn, I merged #1211 here. I thought I created the stack properly 🤦 EDIT/ adjusted |
5d5b995 to
8c84440
Compare
ChristophWurst
left a comment
There was a problem hiding this comment.
Nice, this makes the ordering much more meaningful than "last touched wins", and the scorer tests read well (the arithmetic in the comments helps). The index (user_id, file_id) matches both new queries, which is good.
Before this can go in:
- Rebase onto master. The ocp bump commit ("update nextcloud/ocp for NodeOpenedEvent") may already be on master (66e6f27), and the assets need recompiling.
- Decide on files opened only once showing up as "frequently opened":
findFrequenthas no minimum number of opens, so a one-off open can be labelled "Opened often, last …" when the user has few frequent files. Maybe aHAVING count(id) >= 2? - Tests for
FrequentlyOpenedFilesSource, theRecommendationServiceslicing (max <= 0, slice to$max) and the scorer fallback path ($shown[$id] ??=), plus paging, user isolation and the tie-break forfindFrequent.
Question rather than a blocker: each source returns at most 7 files, so the scorer only re-ranks up to 42 candidates. Fine for a first guess if intended.
nit: clamp the weight_* config values to >= 0, and document the keys in the README or admin docs, not only in the PR body.
Assisted by ClaudeCode:claude-sonnet-5-5
Pull Request is not mergeable
8c84440 to
a4d309a
Compare
|
Thanks! Rebased. 66e6f27 was an older ocp bump without NodeOpenedEvent, so the PR still updates it. Frequent files now need at least 2 opens, weights below 0 count as 0, and the missing tests are in. The weight keys are documented in the README. The 7 per source is intended for now: the scorer re-ranks what each source thinks is most relevant, and raising it means more queries per dashboard load. Easy to bump once we have real usage to tune against. |
a4d309a to
68f54f6
Compare
|
ping @ChristophWurst :) |
3ba48d5 to
8b6ad7d
Compare
Sorting by date alone put whatever changed last on top. Each reason a file is recommended for now adds its weight, halved for every week it is old, so a file recommended for several reasons ranks higher. How often the user opened a file adds to it too, and a new "frequently opened" source brings in files opened often but not lately. The weights follow the RFC and can be tuned per instance with the app config keys weight_<reason>, e.g. weight_recently_opened. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
The frequency part of the score never decayed, so a file opened 4 times weeks ago still ranked above a file shared today. It is now halved for every 30 days since the file was last opened, the time opens are kept. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
A file opened once could show as "Opened often" when the user had few frequent files. Also cover paging, user isolation and the tie-break. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
A negative weight would push a reason's files below unrelated ones. Also cover a frequently opened file whose opens were cleaned up. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
ChristophWurst
left a comment
There was a problem hiding this comment.
All five points from my earlier review are addressed: the ocp bump is still needed (master's 66e6f27 only reached bfe3aee), assets are covered by npmbuildbot now, MIN_FREQUENT_OPENS = 2 fixes the one-off "Opened often" case, the missing tests exist (source, service slicing, scorer fallback, paging, isolation, tie-break), and weights are clamped to >= 0 and documented in the README. CI is green across all DBs, Psalm, lint and DCO. Approve.
Assisted by MistralVibe:mistral-vibe
Recommendations were sorted by date only, so whatever changed last won. Now each reason adds its weight, halved for every week it's old, and how often you opened a file adds to it, fading over a month since you last opened it. A file recommended for several reasons ranks higher. A "frequently opened" source brings in files you open often but not lately.
Relates to #888. Stacked on #1208.
Weights follow the RFC: opened 0.3, frequently opened 0.2, favorite 0.2, edited, shared and commented 0.1. Any of them can be tuned per instance without a release, for example
occ config:app:set recommendations weight_favorite --value 0.3 --type float. These are a first guess, tuning them on real usage is the next step.👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.