Skip to content

Persist jobs and artifacts filters in the URL#270

Merged
ericmj merged 1 commit into
mainfrom
persist-liveview-state
Jun 14, 2026
Merged

Persist jobs and artifacts filters in the URL#270
ericmj merged 1 commit into
mainfrom
persist-liveview-state

Conversation

@ericmj

@ericmj ericmj commented Jun 14, 2026

Copy link
Copy Markdown
Member

The jobs and artifacts pages kept their filter selection and pager offsets only in socket assigns, so any LiveView re-mount — a websocket reconnect, a deploy, or a plain refresh — dropped them through mount/3. That's why a selected filter would silently clear after ~30s on production.

Sync that state to the URL with push_patch and restore it in handle_params, the same pattern the Docker tags page already uses (6dd0bee). Filters now survive reconnects and the views are shareable/bookmarkable.

Covers every LiveView where a re-mount loses state: Jobs (/) and Artifacts (/artifacts); Docker tags (/docker) already did this.

Pairs with hexpm-ops bob-websocket-timeout, which stops the 30s websocket drops that triggered the re-mounts in the first place.

Both pages kept their filter selection and pager offsets only in socket
assigns, so any LiveView re-mount — a websocket reconnect, a deploy, or a plain
refresh — dropped them through mount/3. Sync that state to the URL with
push_patch and restore it in handle_params, the same way the docker tags page
already does, so filters survive reconnects and the views are shareable.
@ericmj ericmj merged commit 23c1941 into main Jun 14, 2026
4 checks passed
@ericmj ericmj deleted the persist-liveview-state branch June 14, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant