Skip to content

Change log page#1697

Open
a-limyr wants to merge 6 commits into
masterfrom
changelog-report
Open

Change log page#1697
a-limyr wants to merge 6 commits into
masterfrom
changelog-report

Conversation

@a-limyr
Copy link
Copy Markdown
Contributor

@a-limyr a-limyr commented Apr 1, 2026

Summary

Adds a Changelog page that lets users search for recent stop place changes using the same modality, topographical, and free-text filters available on the main search page. Results are displayed in a sortable table
with expandable rows showing the full version history per stop place. Users can save, load, and delete named filter presets that persist across sessions via localStorage.

Issue

No existing issue — full description below.

Motivation:

Operators need an audit trail view to see which stop places were recently changed, who changed them, and what comment was left. The existing Report page covers search, but has no changelog/version-history
perspective.

How the code works:

  • A new /changelog route is added, accessible from the header menu (history icon).
  • The page reuses the existing findStopForReport GraphQL action with versionValidity: "MAX_VERSION" so results include expired stops. Two fields (changedBy, versionComment) were added to the ReportStopPlace and
    ReportParentStopPlace fragments.
  • Per-stop version history is loaded lazily on row expand via getStopPlaceVersions, sorted by version descending.
  • Filters are persisted to the URL on each search (via the existing buildReportSearchQuery / extractQueryParamsFromUrl helpers), making searches bookmarkable and surviving page refresh.
  • Favourite filter presets are stored under the localStorage key "ABZU::changelog-favorites" (separate from the main search favourites). The save dialog and popover are self-contained — no Redux involved.

Technical decisions:

  • The container (src/containers/ChangelogPage.tsx) holds all state and data-fetching logic; the component (src/components/ChangelogPage/ChangelogPage.tsx) is pure presentational — consistent with the existing
    container/component pattern in this codebase.
  • Both files are TypeScript. The old .js entry points are kept as re-export stubs so existing imports continue to resolve (Vite resolves .js before .tsx; allowImportingTsExtensions was added to tsconfig.json).
  • TopoChip.value (JSX) is stripped before writing to localStorage and reconstructed on load, since JSX is not JSON-serialisable.

Unit tests

  • No automated unit tests were added for this feature.
    • Manual verification was done:
      • Searching with modality, topographical, and free-text filters returns expected results.
      • Expanding a row shows the full version history in chronological order.
      • Filters round-trip correctly through the URL (bookmark and reload).
      • Saving a filter preset, reloading the page, and loading the preset correctly restores all filter fields including topographical chips.
      • Deleting a saved preset removes it immediately from the popover and from localStorage.
    • The container/component split makes the container logic unit-testable in isolation (state + handlers, no DOM dependency).

Documentation

No new configuration options were added.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Visit the preview URL for this PR (updated for commit bf25f73):

https://ent-ror-abzu-dev--pr1697-changelog-report-zo9tw3h7.web.app

(expires Thu, 16 Apr 2026 07:53:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 062563fce35e36a421ef531ddfc5db6c937ea3b1

Made custom queries for change log page.
@a-limyr a-limyr requested a review from testower April 9, 2026 09:12
@testower
Copy link
Copy Markdown
Contributor

testower commented Apr 9, 2026

Would be useful with some links from the changelog back to the stop places / versions maybe?

Comment thread src/containers/ChangelogPage.js Outdated
Comment thread src/containers/ChangelogPage.tsx Outdated
saveDialogError: string;
}

class ChangelogPage extends React.Component<Props, LocalState> {
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.

Avoid using class component.

Also, this should be split up into more components for composition. The fact that botht he component and the container are called "ChangelogPage" is a bit of a bad sign in terms of code design. Maybe there is a solution that composes multiple component in the container?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@a-limyr a-limyr requested a review from testower April 13, 2026 09:31
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.

2 participants