Repository navigation
Files: filter by upload date - #1275
Conversation
Adds ?since=1d|7d|30d to the Files views (Filters → Uploaded) and a matching since param on the pulls, repos, scope and by-path routes. Relative windows keep a shared link meaning "the last N days". No new indexes, so no extra D1 writes. On scope and pulls the window is a range on the existing partial and cursor indexes; on repos and by-path it is checked before the per-row subqueries, so a short window reads less than today. The drill-in filters its capped page client-side. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsGRzxzuHgaKiSjXwGmWL6
|
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 2
🚫 Excluded labels (none allowed): 1
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
AI notes · nothing to flag
1 file · add media: |

Adds an Uploaded section to the Filters popover on every Files view: Last 24 hours, Last 7 days and Last 30 days. The active window shows as a chip like the other filters.
URL and API
?since=1d|7d|30don the Files URLs. The windows are relative, so a shared link keeps meaning "the last N days".since=Nd(1 to 365) on/pulls,/repos,/scope/:owner/:repo/filesand/files/by-path. A bad value returns 400invalid_since. The by-path param is documented in the OpenAPI file./pulls,sincereplaces the 90-day window and also narrows the thumbnails. "Show older pull requests" hides while a window is set./repos,sincedrops repos with no media in the window (type and surface only narrow thumbnails).updated_at, the upload or last-overwrite time, not PR dates.D1 cost
No new indexes, so no extra writes.
EXPLAIN QUERY PLANon the local D1:SEARCH r USING COVERING INDEX file_metadata_gh_repo_recent_idx (workspace=? AND meta_value=? AND updated_at>?). The window is an index range, so fewer rows are read.SEARCH github_pr_activity USING INDEX github_pr_activity_workspace_cursor_idx (workspace_name=? AND last_media_at>?).updated_atcheck comes before the per-row subqueries (the promoted-shadow check and by-path's four metadata lookups), so rows outside the window skip them. A short window reads less than an unfiltered request does.files/search) is untouched. The web filters its capped 100-item page byupdatedAt, the same way the type filter already works.Tests
since, plus a route test covering the pulls window, thumbnails, repos, scope files andinvalid_since. 3508 pass.matchesSinceFilter, empty-state copy. 1347 → 1350 pass. astro check is clean.by-path?since=7d(6 → 5 groups).Generated by Claude Code