Skip to content

DRAFT: Stop change history latest#1360

Merged
suvikankare merged 3 commits intomainfrom
stop-change-history-latest
Feb 27, 2026
Merged

DRAFT: Stop change history latest#1360
suvikankare merged 3 commits intomainfrom
stop-change-history-latest

Conversation

@suvikankare
Copy link
Copy Markdown
Member

@suvikankare suvikankare commented Feb 25, 2026

This change is Reviewable

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 25, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown
Contributor

@Huulivoide Huulivoide left a comment

Choose a reason for hiding this comment

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

@Huulivoide reviewed all commit messages and made 3 comments.
Reviewable status: 0 of 16 files reviewed, 3 unresolved discussions (waiting on suvikankare).


ui/src/components/stop-registry/stops/change-history/components/LatestStopChangeHistoryItem.tsx line 49 at r1 (raw file):

          {historyItem.privateCodeType === 'HSL/JORE-3'
            ? t('stopChangeHistory.importedVersion')
            : t('stopChangeHistory.firstVersion')}

Voisi olla myös kopio. ui/src/components/stop-registry/stops/change-history/components/NoPreviousChangeVersionSection.tsx

const copiedVersionsImportedIdRegexp = /HSL:Quay:\d+-\d{4}-\d{2}-\d{2}-\d+/;
function determineType(historyItem: QuayChangeHistoryItem): ChangeVersionType {
  if (historyItem.importedId?.match(copiedVersionsImportedIdRegexp)) {
    return 'copied';
  }

  if (historyItem.privateCodeType === 'HSL/JORE-3') {
    return 'imported';
  }

  return 'created';
}

ui/src/components/stop-registry/stops/change-history/components/LatestStopChangeHistoryTable.tsx line 125 at r1 (raw file):

  const { historyItems, loading, error, refetch } =
    useGetStopChangeHistoryItems({

Lähtökohtasestihan Quayn ei pitäs päivittyä, jos sitä ei oo oikeesti mitnekään muutettu. Täten, jos noutaa vaan 5 viimesintä, versiota, niin pitäs näkyviin 5 viiimisintä muutosta. Eli vois olla joku oma kysely joka nakkaa oikeen sortin paikoilleen, ja sit limit: 5


ui/src/components/stop-registry/stops/change-history/components/LatestStopChangeHistoryTable.tsx line 135 at r1 (raw file):

    });

  const { showLoader, previousHistoryItems } = usePrettyLoaderState(

Tää oli tuolla muutossivulla, sen takia, että ku siellä voi muuttaa sitä järjestystä ja vaihtaa aika suodatinta nuolinapeilla päivä kerrallaan, niin vaikka sieltä kannasta tulikin vastaukset parissakymmenessä millisekunnissa, niin UI:lla se tila ehti kuitenkin vaihtuu ladatun ja latauksen ja spinneri välähti ruudulla yhden framin ajan.

Täällä ton sisällä ei pitäs koskaan olla tommosta tilannetta.

@suvikankare suvikankare force-pushed the stop-change-history-latest branch from ff37230 to 0492b24 Compare February 26, 2026 12:06
Copy link
Copy Markdown
Member Author

@suvikankare suvikankare left a comment

Choose a reason for hiding this comment

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

@suvikankare made 3 comments.
Reviewable status: 0 of 20 files reviewed, 3 unresolved discussions (waiting on Huulivoide).


ui/src/components/stop-registry/stops/change-history/components/LatestStopChangeHistoryItem.tsx line 49 at r1 (raw file):

Previously, Huulivoide (Jesse Jaara) wrote…

Voisi olla myös kopio. ui/src/components/stop-registry/stops/change-history/components/NoPreviousChangeVersionSection.tsx

const copiedVersionsImportedIdRegexp = /HSL:Quay:\d+-\d{4}-\d{2}-\d{2}-\d+/;
function determineType(historyItem: QuayChangeHistoryItem): ChangeVersionType {
  if (historyItem.importedId?.match(copiedVersionsImportedIdRegexp)) {
    return 'copied';
  }

  if (historyItem.privateCodeType === 'HSL/JORE-3') {
    return 'imported';
  }

  return 'created';
}

Done.


ui/src/components/stop-registry/stops/change-history/components/LatestStopChangeHistoryTable.tsx line 125 at r1 (raw file):

Previously, Huulivoide (Jesse Jaara) wrote…

Lähtökohtasestihan Quayn ei pitäs päivittyä, jos sitä ei oo oikeesti mitnekään muutettu. Täten, jos noutaa vaan 5 viimesintä, versiota, niin pitäs näkyviin 5 viiimisintä muutosta. Eli vois olla joku oma kysely joka nakkaa oikeen sortin paikoilleen, ja sit limit: 5

limit: 6 koska muuten näyttää aina viimeisimpänä sen imported, muuten done


ui/src/components/stop-registry/stops/change-history/components/LatestStopChangeHistoryTable.tsx line 135 at r1 (raw file):

Previously, Huulivoide (Jesse Jaara) wrote…

Tää oli tuolla muutossivulla, sen takia, että ku siellä voi muuttaa sitä järjestystä ja vaihtaa aika suodatinta nuolinapeilla päivä kerrallaan, niin vaikka sieltä kannasta tulikin vastaukset parissakymmenessä millisekunnissa, niin UI:lla se tila ehti kuitenkin vaihtuu ladatun ja latauksen ja spinneri välähti ruudulla yhden framin ajan.

Täällä ton sisällä ei pitäs koskaan olla tommosta tilannetta.

Poistettu

@suvikankare suvikankare force-pushed the stop-change-history-latest branch from 0492b24 to 79b5262 Compare February 26, 2026 12:13
Copy link
Copy Markdown
Contributor

@Huulivoide Huulivoide left a comment

Choose a reason for hiding this comment

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

@Huulivoide reviewed 20 files and all commit messages, made 2 comments, and resolved 3 discussions.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on suvikankare).


ui/src/components/stop-registry/stops/change-history/components/LatestStopChangeHistoryItem.tsx line 51 at r3 (raw file):

      <div className="mb-3 text-sm font-semibold">
        <Link
          to={routeDetails[Path.stopChangeHistory].getLink(publicCode)}

Alempana tarkempi kommentit, mutta prioriteetti mukaan


ui/src/components/stop-registry/stops/change-history/components/LatestStopChangeHistoryItem.tsx line 119 at r3 (raw file):

        <div key={section.title}>
          <Link
            to={routeDetails[Path.stopChangeHistory].getLink(publicCode)}

prioriteetti pitäs olla mukana kanssa, ja sit ehkä vois olla aiheellista varmistaa että täältä tulee from ja to datet paikoilleen siten että siel ruudul sit näkyis se haluttu muutos. Tosin sit kyl pitös varmaan arpoo myös oikee pakinointi sivu paikoilleen, ja ois varmaan kiva jos se aut skrollais oikeeseen kohtaan vielä 🙈

Prioriteetti mukaan, se on tärkein, muut voi olla jatkokehitystä.

@suvikankare suvikankare force-pushed the stop-change-history-latest branch from 79b5262 to 214d641 Compare February 27, 2026 08:48
@suvikankare suvikankare marked this pull request as ready for review February 27, 2026 08:51
Copy link
Copy Markdown
Contributor

@Huulivoide Huulivoide left a comment

Choose a reason for hiding this comment

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

Sit vielä tuli mieleen, tälleen ei blokkaavana kommenttina että voisit miettii:

  1. Oisko järkee splitata noita komponentteja pienempiin palasiin, Loader, Error, View state omiin ali palasiinsa yms.
  2. Miettii jo etukäteen vähän Pysäkkialuuen ja Terminaalin vastaavia komponentteja, ja että onko tässä mitään semmosta koodin pätkää, jonka vois jo valmiiks kirjottaa jotenkin geneerisemmässä muodossa (jos ei jo ole).

@Huulivoide reviewed 3 files and all commit messages, made 1 comment, and resolved 2 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on suvikankare).

@suvikankare suvikankare force-pushed the stop-change-history-latest branch from 214d641 to 3c9fb1a Compare February 27, 2026 10:23
Copy link
Copy Markdown
Contributor

@Huulivoide Huulivoide left a comment

Choose a reason for hiding this comment

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

@Huulivoide reviewed 8 files and all commit messages, and made 3 comments.
Reviewable status: 25 of 27 files reviewed, 3 unresolved discussions (waiting on suvikankare).


ui/src/components/common/ChangeHistory/LatestChangeHistoryItem.tsx line 20 at r5 (raw file):

  };
  readonly sections: ReadonlyArray<ChangeSection>;
  readonly link: string;

Teknisesti tyyppi vois olla To


ui/src/components/stop-registry/stops/change-history/components/LatestStopChangeHistoryItem.tsx line 60 at r5 (raw file):

    previousCached?.status !== 'fetched'
  ) {
    return <LoadingState />;

Pitäs varmaan olla FailedToLoadState


ui/src/components/stop-registry/stops/change-history/utils/latestStopChangeSections.ts line 19 at r5 (raw file):

};

export const latestStopChangeSections = (

ylätasolla niin function latest...

Copy link
Copy Markdown
Contributor

@Huulivoide Huulivoide left a comment

Choose a reason for hiding this comment

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

@Huulivoide made 1 comment.
Reviewable status: 25 of 27 files reviewed, 4 unresolved discussions (waiting on suvikankare).


ui/src/components/common/ChangeHistory/ErrorLoadingState.tsx line 10 at r5 (raw file):

};

export const ErrorLoadingState: FC<ErrorLoadingStateProps> = ({

Täällä vois hartkita alikansiota tai laittaa näihin load state komponentteihin sen LatestChangeHistory prefiksin mukaan, koska nää liittyy siihen ominaisuuteen, eikä nää oo käytössä muutoshistoriasivun puolella.

@suvikankare suvikankare force-pushed the stop-change-history-latest branch 2 times, most recently from 4ef4aee to 7ad1172 Compare February 27, 2026 11:32
@suvikankare suvikankare force-pushed the stop-change-history-latest branch from 7ad1172 to 8a71343 Compare February 27, 2026 12:00
Copy link
Copy Markdown
Member Author

@suvikankare suvikankare left a comment

Choose a reason for hiding this comment

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

@suvikankare made 4 comments.
Reviewable status: 17 of 28 files reviewed, 4 unresolved discussions (waiting on Huulivoide).


ui/src/components/stop-registry/stops/change-history/components/LatestStopChangeHistoryItem.tsx line 60 at r5 (raw file):

Previously, Huulivoide (Jesse Jaara) wrote…

Pitäs varmaan olla FailedToLoadState

Done.


ui/src/components/stop-registry/stops/change-history/utils/latestStopChangeSections.ts line 19 at r5 (raw file):

Previously, Huulivoide (Jesse Jaara) wrote…

ylätasolla niin function latest...

Done.


ui/src/components/common/ChangeHistory/ErrorLoadingState.tsx line 10 at r5 (raw file):

Previously, Huulivoide (Jesse Jaara) wrote…

Täällä vois hartkita alikansiota tai laittaa näihin load state komponentteihin sen LatestChangeHistory prefiksin mukaan, koska nää liittyy siihen ominaisuuteen, eikä nää oo käytössä muutoshistoriasivun puolella.

Done.


ui/src/components/common/ChangeHistory/LatestChangeHistoryItem.tsx line 20 at r5 (raw file):

Previously, Huulivoide (Jesse Jaara) wrote…

Teknisesti tyyppi vois olla To

Done.

Copy link
Copy Markdown
Contributor

@Huulivoide Huulivoide left a comment

Choose a reason for hiding this comment

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

@Huulivoide partially reviewed 11 files and all commit messages, and resolved 4 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on suvikankare).

@suvikankare suvikankare merged commit 6e2fb3c into main Feb 27, 2026
24 checks passed
@suvikankare suvikankare deleted the stop-change-history-latest branch February 27, 2026 12:20
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