Navigate users to latest revision of a patch

Instead of displaying the first revision of a patch, we should in
general send users to the latest revision of a patch and let user then
decide if they want to get more context.
This commit is contained in:
Sebastian Martinez
2025-02-20 11:27:59 -06:00
committed by Rūdolfs Ošiņš
parent 618ae682bc
commit 31b2d9a9e1
+4 -2
View File
@@ -80,7 +80,9 @@
let updatedTitle = $state("");
let labelSaveInProgress: boolean = $state(false);
let assigneesSaveInProgress: boolean = $state(false);
let tab: "patch" | "revisions" | "timeline" = $state("patch");
let tab: "patch" | "revisions" | "timeline" = $state(
revisions.length > 1 ? "revisions" : "patch",
);
let selectedRevision: Revision = $state(revisions.slice(-1)[0]);
$effect(() => {
@@ -93,7 +95,7 @@
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
patch.id;
tab = "patch";
tab = revisions.length > 1 ? "revisions" : "patch";
editingTitle = false;
updatedTitle = patch.title;
selectedRevision = revisions.slice(-1)[0];