(feat #43) Right now feed - Phase 1 #328

Closed
KinkyMonk wants to merge 7 commits from KinkyMonk/open-grind:newrightnow into main
Contributor

Most of the work was done in #236, but since it's been quite a while since I opened that PR and I didn't want to go through merge hell, I started from clean slate and ported the files ones by one.

Supported

  • Filtering / Sorting
  • Showing thumbnails

Not implemented in this PR

  • View full size image
  • Post a new message
  • Reporting a post

imageimageimage

Most of the work was done in #236, but since it's been quite a while since I opened that PR and I didn't want to go through merge hell, I started from clean slate and ported the files ones by one. **Supported** - Filtering / Sorting - Showing thumbnails **Not implemented in this PR** - View full size image - Post a new message - Reporting a post ![image](/attachments/4e6fdd3b-3df5-4719-815a-c87e604679d9)![image](/attachments/922f7d12-83b5-429f-9f4b-27a478ee98d3)![image](/attachments/9c7ca10e-7ea6-4bc6-996e-67bfcf9dd4e2)
Right now page
Some checks failed
check / check (pull_request) Has been cancelled
363dcb4462
Pass thumbnail through proxy
Some checks failed
check / check (pull_request) Has been cancelled
cbffaacb5a
hloth left a comment
  • AgeQuickFilter uses dismissOnBackGesture (as do 11 other files) and Drawer.Body; the other three drawers use backGestureEventHandlers.add/delete and use a bare <div>
  • Zero tests
  • Filters survive sign-out and leak to the next account (accountPreferenceKeys should have rightNowFilters just like gridSearchFilters)
  • Use AGE_MIN/AGE_MAX instead of hardcoded [18, 102]
  • resetFilters() double-saves
  • imediaOf typo
  • z.number().int() instead of z.int()
  • text-gray-400 when the codebase uses text-muted-foreground
  • src/lib/util/random.ts exists, use it instead of LCG
  • dead mediaStates + $effect in RightNowPost
- `AgeQuickFilter` uses `dismissOnBackGesture` (as do 11 other files) and `Drawer.Body`; the other three drawers use `backGestureEventHandlers.add/delete` and use a bare `<div>` - Zero tests - Filters survive sign-out and leak to the next account (`accountPreferenceKeys` should have `rightNowFilters` just like `gridSearchFilters`) - Use `AGE_MIN`/`AGE_MAX` instead of hardcoded `[18, 102]` - `resetFilters()` double-saves - `imediaOf` typo - `z.number().int()` instead of `z.int()` - `text-gray-400` when the codebase uses `text-muted-foreground` - src/lib/util/random.ts exists, use it instead of LCG - dead `mediaStates` + `$effect` in `RightNowPost`
@ -0,0 +67,4 @@
});
export type LockedPostV1 = z.infer<typeof LockedPostV1Schema>;
export const RightNowFeedResponseItemSchema = z.discriminatedUnion("type", [
Owner

New spec says "Unrecognized type values are tolerated by the client". We now have src/lib/model/tolerance.ts with arrayOfKnownVariants. Use it instead of strict z.discriminatedUnion.

New spec says "Unrecognized type values are tolerated by the client". We now have src/lib/model/tolerance.ts with arrayOfKnownVariants. Use it instead of strict z.discriminatedUnion.
@ -0,0 +10,4 @@
class RightNowState {
filters = new RightNowSearchFiltersState({
onQueryChange: () => {
console.log(11);
Owner

Delete

Delete
KinkyMonk marked this conversation as resolved
@ -0,0 +11,4 @@
filters = new RightNowSearchFiltersState({
onQueryChange: () => {
console.log(11);
this.refresh();
Owner

Network request after sign-out. The grid's reset() assigns this.value directly to avoid this, and grid-state.svelte.test.ts:375 asserts it.

Network request after sign-out. The grid's `reset()` assigns `this.value` directly to avoid this, and grid-state.svelte.test.ts:375 asserts it.
Author
Contributor

In the grid, tapping the reset button (gridState.filters.resetFilters()) does reset the filters, but the "no profiles found component" remains. The user has to set a new filter or pull to refresh to see profiles in the grid again.

In the grid, tapping the reset button (`gridState.filters.resetFilters()`) does reset the filters, but the "no profiles found component" remains. The user has to set a new filter or pull to refresh to see profiles in the grid again.
@ -20,0 +30,4 @@
container={feedContainer}
updating={rightNowState.refreshing}
position="top"
onrefresh={() => void rightNowState.refresh()}
Owner

refresh() is destructive, {#if !loading} unmounts the control mid-gesture, and updating never goes true because only reload() sets refreshing — and reload() has no callers

`refresh()` is destructive, `{#if !loading}` unmounts the control mid-gesture, and `updating` never goes true because only `reload()` sets `refreshing` — and `reload()` has no callers
@ -0,0 +13,4 @@
});
beforeNavigate(() => {
rightNowState.scrollY = window.scrollY;
Owner

.pull-scroller is overflow-auto, so window.scrollY is always 0 and beforeNavigate resets the saved position

`.pull-scroller` is `overflow-auto`, so `window.scrollY` is always 0 and `beforeNavigate` resets the saved position
@ -0,0 +48,4 @@
<div class="flex flex-1 justify-start"></div>
<Drawer.Title>Hosting Status</Drawer.Title>
<div class="flex flex-1 justify-end">
<Switch id="hosting-filter-enabled" bind:checked={enabled} />
Owner

Use aria-labels or <label for> for those ids. Cover in e2e/accessible-names.spec.ts.

Use `aria-label`s or `<label for>` for those ids. Cover in `e2e/accessible-names.spec.ts`.
first pass of fixes from review
Some checks failed
check / check (pull_request) Has been cancelled
credits / credits (pull_request) Has been cancelled
audit / audit (pull_request) Has been cancelled
51eefc7a66
Added arrayOfKnownVariants in Schema. Fixed "double save" on filter reset
Some checks failed
check / check (pull_request) Has been cancelled
credits / credits (pull_request) Has been cancelled
669434dd6b
Owner

Superseded by !520 !523 !544

Superseded by !520 !523 !544
hloth closed this pull request 2026-11-13 18:16:31 +01:00
Some checks failed
check / check (pull_request) Has been cancelled
credits / credits (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No description provided.