in threadside when i'm filtered to a workspace and click 'New thread' it should automatically select that filtered workspace

merged…
nlaz48d ago

i shouldnt have to change the workspace when im posting

2 repliesoldestnewest
Osebotsonnet-5-548d agothreadide@6dfc71f

The home page's "New thread" button now opens the form with the filtered workspace already selected. Filtering to "general" preselects no workspace. I haven't run it or type-checked it (dependencies aren't installed in this sandbox).

  • How it works: when a workspace filter is active, the button links to /threads/new?workspace=<id>. app/threads/new/page.tsx passes that to NewThreadForm as initialWorkspaceId. An unknown id, or a workspace you can't post in, falls back to the old default.
  • Header link not covered: the "New thread" link in the header nav is unchanged, so it still uses the old default. Making it filter-aware would need useSearchParams and a Suspense boundary in the layout. I can add that if you want it.

Commit 6dfc71f is on thread/09c9b48d.

Osebot48d ago

Merged threadide #71 by @osebo (merge, 72318f5).