Skip to content

Viewer: trails of 25+ hops fail "Read as flow"; trail limits disagree (store 64, flow 24, nodes 60) #1976

Closed

Description

@inth3shadows

The viewer's trail size limits disagree, so ordinary long walks fail:

where limit
in-memory trail (ui/src/lib/trail.svelte.ts) none
trail store (src/ui-server/api/trail-store.ts:46, MAX_TRAIL_HOPS) 64
/api/flow (src/ui-server/api/flow.ts:84) 24 hops
/api/nodes (src/ui-server/api/nodes.ts:21, MAX_NODE_REFS) 60 ids

On main (ba3c21e):

/api/flow with 24 hop= params     → 200
/api/flow with 25 hop= params     → 400 "A trail of 25 hops is longer than this endpoint reads (24)."
/api/nodes with 61 id= params     → 400 "Too many ids: 61. At most 60 per request."

Effect:

  • The trail bar's "Read as flow" sends the whole trail, so any walk of 25 or more hops shows an error instead of a flow. That includes trails the store happily saves at up to 64 hops.
  • resolveTrailNames sends every unnamed hop in one /api/nodes request, so a cold load of a 61–64 hop trail link never resolves its names.

Suggested fix: make one limit the source of truth. Either cap the trail when a hop is pushed, or raise /api/flow to the store's 64. Have the client split /api/nodes calls into batches of 60.

Activity

  1. colbymchenry commented on Sep 27, 2026

    @colbymchenry
    Owner

    Thanks for the detailed report, @inth3shadows, and thanks for using CodeGraph! This is fixed on main by #2001, which builds on @danusha2345's #1994 (thank you!): a trail now holds up to 64 hops everywhere (the trail bar, saved trails and Read as flow), so long trails can always be read as a flow, and their names are fetched in batches the server accepts. The fix will be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions