Skip to content

Rerender tests correctly#523

Merged
matsduf merged 2 commits into
zonemaster:releases/ssg-standalone-componentsfrom
sewebb:rerender-tests-correctly
Dec 15, 2025
Merged

Rerender tests correctly#523
matsduf merged 2 commits into
zonemaster:releases/ssg-standalone-componentsfrom
sewebb:rerender-tests-correctly

Conversation

@tbleckert

Copy link
Copy Markdown
Contributor

Purpose

Fixes #522

Context

When navigating between test results, for example via the History dialog, the view didn’t update with the correct data. The issue was caused by a Svelte component relying on local state, which prevented it from reacting when the incoming data object changed.

Changes

ResultInfo now uses a derived rune instead of local state, which ensures it updates whenever the passed data changes. The history navigation has also been updated to include the language prefix.

How to test this PR

Run a test, then switch to an older one via the History dialog. The displayed data should update immediately and correctly. Also verify that reloading the page shows the same data.

@matsduf matsduf added V-Patch Versioning: The change gives an update of patch in version. RC-None Release category: Not to be included in Changes file. labels Dec 12, 2025
@matsduf matsduf added this to the v2025.2 milestone Dec 12, 2025

@matsduf matsduf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no issues, and when testing the history functions as it should.

@MichaelTimbert MichaelTimbert left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug is fixed. But beware there is some issues when merging with #520 .

@tgreenx

tgreenx commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@tbleckert thanks for the fix. could you fix the conflicts by rebasing this PR?

@marc-vanderwal marc-vanderwal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged #520 then #523 on a local branch; there were easy-to-fix conflicts. Works as advertised. Thanks!

@MichaelTimbert

Copy link
Copy Markdown

I tested this #523 rebased on #511 (after #520 rebase). I encountered a conflict, but everything works correctly after fixing it.

To resolve the conflict I only remove one
import { languageTag } from '@/paraglide/runtime';
and keep changes line 113 of src/lib/components/DomainTest/History.svelte from #520 :

               <a href={`${import.meta.env.BASE_URL}${languageTag()}/result/${item.id}`} onclick={onClickLink}>
                   {formatDate(item.created_at)}
                </a>

@matsduf

matsduf commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@marc-vanderwal, @tgreenx and @MichaelTimbert, I will merge this PR.

@matsduf matsduf merged commit f3dbf6d into zonemaster:releases/ssg-standalone-components Dec 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RC-None Release category: Not to be included in Changes file. V-Patch Versioning: The change gives an update of patch in version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New GUI : Test result messages do not load correctly when fetched from the history

5 participants