Skip to content

Commit 46593b9

Browse files
Copilotsawka
andauthored
Add Release Notes entry to the settings menu (#3005)
This adds a **Release Notes** action to `SettingsFloatingWindow` in the requested position: after **Secrets** and before **Help**. It also wires that action to open the existing `onboarding-upgrade-patch.tsx` UI as a standalone modal, so release notes remain accessible even when automatic upgrade onboarding would not render for up-to-date clients. - **Settings menu** - Adds a new **Release Notes** item to `frontend/app/workspace/widgets.tsx` - Places it between **Secrets** and **Help** - Uses the existing modal system rather than creating a new view/block path - **Release notes launch path** - Registers `UpgradeOnboardingPatch` in the modal registry - Opens it from the settings menu via `modalsModel.pushModal("UpgradeOnboardingPatch", { isReleaseNotes: true })` - **Standalone modal behavior** - Extends `UpgradeOnboardingPatch` with a lightweight `isReleaseNotes` mode - In release-notes mode, closing the modal pops the stacked modal instead of toggling `upgradeOnboardingOpen` - Preserves the existing automatic upgrade-onboarding flow and version metadata update behavior for the original path ```tsx { icon: "book-open", label: "Release Notes", onClick: () => { modalsModel.pushModal("UpgradeOnboardingPatch", { isReleaseNotes: true }); onClose(); }, } ``` - **<screenshot>** - Release notes modal content: ![Release Notes modal](https://github.com/user-attachments/assets/914041a0-1248-4d1a-8eed-125713f7b067) <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/wavetermdev/waveterm/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
1 parent 56c1829 commit 46593b9

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

frontend/app/modals/modalregistry.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { MessageModal } from "@/app/modals/messagemodal";
55
import { NewInstallOnboardingModal } from "@/app/onboarding/onboarding";
66
import { UpgradeOnboardingModal } from "@/app/onboarding/onboarding-upgrade";
7+
import { UpgradeOnboardingPatch } from "@/app/onboarding/onboarding-upgrade-patch";
78
import { DeleteFileModal, PublishAppModal, RenameFileModal } from "@/builder/builder-apppanel";
89
import { SetSecretDialog } from "@/builder/tabs/builder-secrettab";
910
import { AboutModal } from "./about";
@@ -12,6 +13,7 @@ import { UserInputModal } from "./userinputmodal";
1213
const modalRegistry: { [key: string]: React.ComponentType<any> } = {
1314
[NewInstallOnboardingModal.displayName || "NewInstallOnboardingModal"]: NewInstallOnboardingModal,
1415
[UpgradeOnboardingModal.displayName || "UpgradeOnboardingModal"]: UpgradeOnboardingModal,
16+
[UpgradeOnboardingPatch.displayName || "UpgradeOnboardingPatch"]: UpgradeOnboardingPatch,
1517
[UserInputModal.displayName || "UserInputModal"]: UserInputModal,
1618
[AboutModal.displayName || "AboutModal"]: AboutModal,
1719
[MessageModal.displayName || "MessageModal"]: MessageModal,

frontend/app/onboarding/onboarding-upgrade-patch.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ interface VersionConfig {
3232
nextText?: string;
3333
}
3434

35+
interface UpgradeOnboardingPatchProps {
36+
isReleaseNotes?: boolean;
37+
}
38+
3539
interface UpgradeOnboardingFooterProps {
3640
hasPrev: boolean;
3741
hasNext: boolean;
@@ -131,7 +135,7 @@ export const UpgradeOnboardingVersions: VersionConfig[] = [
131135
},
132136
];
133137

134-
const UpgradeOnboardingPatch = () => {
138+
const UpgradeOnboardingPatch = ({ isReleaseNotes = false }: UpgradeOnboardingPatchProps) => {
135139
const modalRef = useRef<HTMLDivElement | null>(null);
136140
const [isCompact, setIsCompact] = useState<boolean>(window.innerHeight < 800);
137141
const [currentIndex, setCurrentIndex] = useState<number>(UpgradeOnboardingVersions.length - 1);
@@ -174,13 +178,21 @@ const UpgradeOnboardingPatch = () => {
174178
}, []);
175179

176180
const doClose = () => {
177-
globalStore.set(modalsModel.upgradeOnboardingOpen, false);
181+
if (isReleaseNotes) {
182+
modalsModel.popModal();
183+
} else {
184+
globalStore.set(modalsModel.upgradeOnboardingOpen, false);
185+
}
178186
setTimeout(() => {
179187
globalRefocus();
180188
}, 10);
181189
};
182190

183191
const handleClose = () => {
192+
if (isReleaseNotes) {
193+
doClose();
194+
return;
195+
}
184196
const clientId = ClientModel.getInstance().clientId;
185197
RpcApi.SetMetaCommand(TabRpcClient, {
186198
oref: WOS.makeORef("client", clientId),

frontend/app/workspace/widgets.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { RpcApi } from "@/app/store/wshclientapi";
77
import { TabRpcClient } from "@/app/store/wshrpcutil";
88
import { shouldIncludeWidgetForWorkspace } from "@/app/workspace/widgetfilter";
99
import { atoms, createBlock, getApi, isDev } from "@/store/global";
10+
import { modalsModel } from "@/store/modalmodel";
1011
import { fireAndForget, isBlank, makeIconClass } from "@/util/util";
1112
import {
1213
FloatingPortal,
@@ -284,6 +285,14 @@ const SettingsFloatingWindow = memo(
284285
onClose();
285286
},
286287
},
288+
{
289+
icon: "book-open",
290+
label: "Release Notes",
291+
onClick: () => {
292+
modalsModel.pushModal("UpgradeOnboardingPatch", { isReleaseNotes: true });
293+
onClose();
294+
},
295+
},
287296
{
288297
icon: "circle-question",
289298
label: "Help",

0 commit comments

Comments
 (0)