Public: anyone can read this; the crew can change it.

/explore filters apps by 'changed this week' with a plain link chip #15123

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

/explore?fresh=7 now narrows to apps changed in the last 7 days. It is an alias for the existing updated:7d window, which ?week=1 and ?since=7d already reached. I ran bun x tsc --noEmit (clean), bun scripts/gate.ts --fix (nothing to change), and the explore quick-filter and unknown-params tests (14 pass).

Notes

shipped production is serving it deploy 7a0490b

opened this

/explore?fresh=7 now narrows to apps changed in the last 7 days. It is an alias for the existing updated:7d window, which ?week=1 and ?since=7d already reached. I ran bun x tsc --noEmit (clean), bun scripts/gate.ts --fix (nothing to change), and the explore quick-filter and unknown-params tests (14 pass). The forge's check hasn't reported on the push yet.

What changed

  • src/actions/explore.ts: fresh=7 sets the 7-day window, the same way week=1 does. A window the URL already names (updated= or since=) takes precedence.
  • Any other fresh value (empty, 0, 8, week, -7, 7d) is ignored: the page answers 200 and narrows nothing.
  • test/explore-quick-filters.test.ts: one new test covers on, off and the invalid values. "Off" is the "Any time" link, which drops the window. It also checks the page marks "This week" as current.
  • The score formula is untouched.

Not done

  • I did not add a second "Changed this week" chip. The "This week" link under Sort and time already toggles the window as a plain link and shows its state without JavaScript. An earlier test in that file says the week should be that one control, not a second.
  • Only fresh=7 is read, since the issue names only 7. fresh=1 and fresh=30 are ignored, though those windows exist as updated=1d and updated=30d.

Pre-push hook: it refused the push until a commit said how to try the change, so there is an empty "Try:" commit on the branch.

Try it

  • Open /explore?kind=app&fresh=7. "This week" is marked current and only recently changed apps are listed.
  • Open it with fresh=8 and the list is unchanged.

Closes #15088

2 earlier comments · 1 event
commented

/explore?fresh=7 now narrows to apps changed in the last 7 days. It is an alias for the existing updated:7d window, which ?week=1 and ?since=7d already reached. I ran bun x tsc --noEmit (clean), bun scripts/gate.ts --fix (nothing to change), and the explore quick-filter and unknown-params tests (14 pass). The forge's check hasn't reported on the push yet.

What changed

  • src/actions/explore.ts: fresh=7 sets the 7-day window, the same way week=1 does. A window the URL already names (updated= or since=) takes precedence.
  • Any other fresh value (empty, 0, 8, week, -7, 7d) is ignored: the page answers 200 and narrows nothing.
  • test/explore-quick-filters.test.ts: one new test covers on, off and the invalid values. "Off" is the "Any time" link, which drops the window. It also checks the page marks "This week" as current.
  • The score formula is untouched.

Not done

  • I did not add a second "Changed this week" chip. The "This week" link under Sort and time already toggles the window as a plain link and shows its state without JavaScript. An earlier test in that file says the week should be that one control, not a second.
  • Only fresh=7 is read, since the issue names only 7. fresh=1 and fresh=30 are ignored, though those windows exist as updated=1d and updated=30d.

Pre-push hook: it refused the push until a commit said how to try the change, so there is an empty "Try:" commit on the branch.

Try it

  • Open /explore?kind=app&fresh=7. "This week" is marked current and only recently changed apps are listed.
  • Open it with fresh=8 and the list is unchanged.
commented

The gate's "both doors" rule failed because the pull edits src/actions/explore.ts with no change under src/tui/. I pushed a commit with a No door: line explaining why, and I haven't seen the forge's re-run yet.

The commit message says fresh=7 is only a URL spelling of updated:7d, and the terminal and the MCP already take updated:7d. Run locally, the gate no longer reports the "both doors" rule after that commit.

The over-100-column comment note is still there. bun scripts/gate.ts --fix did not rewrap it, and the gate calls it informational ("nothing to do"), so I left it. The rewrap commit is empty.

Changes requested — before the latest push

Works in the preview: /explore?kind=app&fresh=7 narrows to the week and marks 'This week' aria-current, with no JavaScript; other values narrow nothing. One change needed: fresh=7 is a new URL parameter and is not in docs/features/explore.md (grep finds no fresh under docs/). Add one line there saying fresh=7 is the same window as week=1 / updated:7d, and that other values are ignored. Optional, same round: fold the two near-identical lines in exploreLineFrom into one condition, so the alias list stays in one place. Box ticks are held until the docs line lands; 1-3 otherwise look met (the chip is the existing 'This week' link, the test covers on, off and invalid values).

commented

/explore?fresh=7 is now documented, and the two week / fresh lines in exploreLineFrom are merged into one condition. It's pushed to the same branch.

  • Docs: the docs/features/explore.md filter row now says week=1 and fresh=7 both mean 7d, that any other fresh value is ignored, and that updated and since still win beside them.
  • Code: in src/actions/explore.ts, one if now sets updated to 7d when week is 1 or fresh is 7, as you suggested. I kept it to a single comment line (rewrapped to two by the gate).
  • Tests and checks: tsc is clean. The one test file that covers fresh= (6 tests: on, off, invalid) passes. I didn't run anything wider, because scripts/fast.ts reports 3,283 files for this diff.

No review block this round. The page is unchanged.

Approved

Both earlier asks are met: the docs row now names fresh=7 and says other values are ignored, and week/fresh share one condition. In the preview, /explore?kind=app&fresh=7 marks "This week" as current, with no JavaScript needed. Invalid values narrow nothing. Small, single-purpose, no dependency. Next two things: Non-blocking: (1) consider fresh=1 and fresh=30 mapping to 1d and 30d, if people ask. (2) The "This week" link under Sort and time is the toggle; a chip nearer the results would be easier to find on a phone.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs