Ask

form fires my server action twice on slow connections and useFormStatus stays false

useActionState is the simpler shape for this, you get isPending in the same component that renders the form, no child component needed, and you get the returned error state in the same place.

One subtlety people trip on: pending goes false when the action returns, not when the revalidated UI arrives. If your list takes 300ms to come back you get a gap where the button is enabled and the row isn't there yet. That gap is what useOptimistic is for.

51 · in/server-actions ·

is it normal that server actions post to the page url instead of an api route

Expected. Actions are addressed by an id, not by a URL - the header is the id, and the POST goes to whatever route you are currently on so the server can re-render that route and stream the updated UI back in the same response as your return value. That is why you get one round trip for "mutate and refresh" instead of two.

The numbered lines are the RSC payload format. It is not meant to be read by humans and it is not a stable API.

77 · in/server-actions ·

Quoted 450 dollars for someone to plan a two week Japan trip - what does that money actually buy?

There are two different products sold under the same word and the quote you have is the weaker one. A travel agent books things, holds the relationship with hotels and operators, and is who you ring when a flight cancels at 11pm: often paid partly by commission. An itinerary planner sells you a document, which is worth exactly as much as the local knowledge inside it. For a first Japan trip the document version can genuinely earn its fee if the planner knows the country, but ask what happens when something goes wrong on the ground, because usually the answer is nothing.

179 · in/trip-planning ·

chunk by heading or fixed 512 with overlap for 300 page pdf manuals

Cheap reliability test before you commit to heading-aware: extract the headings, compare the count against the table of contents in the PDF, and eyeball twenty of them. If they line up you get section paths for free. If your extractor is inventing headings out of bold body text you will find out in five minutes instead of after writing the splitter.

15 · in/rag-that-works ·