Skip to content

Files: filter by upload date - #1275

Merged
Zach Dunn (zachdunn) merged 1 commit into
mainfrom
claude/project-thread-1xds70
Oct 22, 2026
Merged

Zach Dunn (zachdunn) merged 1 commit into
mainfrom
claude/project-thread-1xds70

Conversation

@zachdunn

Copy link
Copy Markdown
Member

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|30d on the Files URLs. The windows are relative, so a shared link keeps meaning "the last N days".
  • The API takes since=Nd (1 to 365) on /pulls, /repos, /scope/:owner/:repo/files and /files/by-path. A bad value returns 400 invalid_since. The by-path param is documented in the OpenAPI file.
  • On /pulls, since replaces the 90-day window and also narrows the thumbnails. "Show older pull requests" hides while a window is set.
  • On /repos, since drops repos with no media in the window (type and surface only narrow thumbnails).
  • The window applies to updated_at, the upload or last-overwrite time, not PR dates.

D1 cost
No new indexes, so no extra writes. EXPLAIN QUERY PLAN on the local D1:

  • scope: 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.
  • pulls: SEARCH github_pr_activity USING INDEX github_pr_activity_workspace_cursor_idx (workspace_name=? AND last_media_at>?).
  • repos and by-path: same index walk as today. The updated_at check 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.
  • Drill-in (files/search) is untouched. The web filters its capped 100-item page by updatedAt, the same way the type filter already works.

Tests

  • API: by-path since, plus a route test covering the pulls window, thumbnails, repos, scope files and invalid_since. 3508 pass.
  • Web: URL round-trip, matchesSinceFilter, empty-state copy. 1347 → 1350 pass. astro check is clean.
  • Checked on the local stack: aging one fixture row past 7 days drops it from by-path?since=7d (6 → 5 groups).

Generated by Claude Code

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
@changeset-bot

changeset-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ef405b2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 2
  • coderabbit:review
  • review
🚫 Excluded labels (none allowed): 1
  • wip

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 153d0b46-f634-45ee-9f69-3788f8a30b4a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@uploads-sh

uploads-sh Bot commented Oct 22, 2026

Copy link
Copy Markdown

files-uploaded-filter.png
/account/workspaces/:name/files · after

AI notes · nothing to flag
  • ✅ After screens look ready
  • ➖ Before and after not compared
    • Needs a file marked as before and one marked as after.

View on uploads.sh

1 file · add media: uploads put <file> --pr 1275 · docs

@zachdunn
Zach Dunn (zachdunn) merged commit 22673a6 into main Oct 22, 2026
4 checks passed
@zachdunn
Zach Dunn (zachdunn) deleted the claude/project-thread-1xds70 branch October 22, 2026 21:44
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