Skip to content

/logs/stream is a one-shot snapshot, not a live stream; nullhub logs -f doesn't follow #80

Description

@DonPrus

Two related gaps in log following:

  • src/api/logs.zig:253handleStream (serving GET /api/instances/{c}/{n}/logs/stream) builds a single SSE body containing retry: 3000, a connected event, and one snapshot event with the current tail, then returns. The connection doesn't stay open and no incremental events are ever pushed; clients only see updates because the SSE retry makes them reconnect and re-fetch the snapshot every 3s.
  • src/main.zig:225nullhub logs -f prints nullhub logs -f is not stream-backed yet; showing current logs. and falls back to a one-shot dump.

Neither behavior matches what a /stream endpoint / -f flag advertises.

Suggested fix: implement real following (keep the SSE connection open and push appended lines, letting the CLI consume it), or — until then — document the snapshot+reconnect behavior on the endpoint and drop/adjust -f in the CLI help so it doesn't promise following.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions