Server render timestamp hydration mismatch
An AI wrote this 'last updated' label for a Next.js server-rendered page. It throws a hydration mismatch warning and the timestamp flickers on load. Explain why and fix it.
Implement
render_last_seen(server_epoch: int, client_epoch: int, pin_to_server: bool) → list[str]Examples
in
[3661,3665,false]out["Updated at 01:01:01","Updated at 01:01:05"]in
[3661,3665,true]out["Updated at 01:01:01","Updated at 01:01:01"]in
[0,0,false]out["Updated at 00:00:00","Updated at 00:00:00"]What a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
0:00 of about 18 min
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.