feat(update): integrate managed installs and recoverable in-app updates (#6168)
Add owner-aware Stable and Preview updates with explicit consent, verified release plans, protected process handoff and bounded service recovery. Keep configuration and conversations separate from program rollback. Include the compact About controls, Windows long-path support, native package recovery checks and optional macOS Dock lifecycle integration. Preserve documented guidance for installations owned by other managers. This code integration does not publish packages, enable signing or advance the public update channel. Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com>
This commit is contained in:
1 parent
76da55994b
commit
fbb61a373f
216 files changed
+27948
-1084
No files matched your search
@@ -28,7 +28,7 @@ function Buttons() {
|
||||
return <div className="space-y-6">
|
||||
<Sample label={t("controls.button.variants")}>
|
||||
<div className="flex flex-wrap items-center gap-3">
|
||||
{(["default", "secondary", "outline", "ghost", "destructive", "link"] as const).map((variant) =>
|
||||
{(["default", "accent", "secondary", "outline", "ghost", "destructive", "link"] as const).map((variant) =>
|
||||
<Button key={variant} variant={variant} onClick={() => setClicks((value) => value + 1)}>{variant}</Button>)}
|
||||
<Button variant="icon" size="icon" aria-label={t("controls.button.add")} onClick={() => setClicks((value) => value + 1)}><Plus className="h-4 w-4" /></Button>
|
||||
</div>
|
||||
|
||||
@@ -481,7 +481,10 @@
|
||||
"options": "AboutSettingsView accepts composed version and support links. VersionCheckRowView displays checking/result and requests checks through onCheck. The feature entry owns actual checks and diagnostic link data.",
|
||||
"error": "Could not get version information. Try again.",
|
||||
"state": "Version state",
|
||||
"selectedLink": "GitHub link selected"
|
||||
"selectedLink": "GitHub link selected",
|
||||
"preferenceSaved": "Sample preference saved; nothing will be installed or restarted.",
|
||||
"updateRequested": "Update review selected; this preview does not install or restart anything.",
|
||||
"dismissed": "Update notice dismissed"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "Appearance preferences",
|
||||
|
||||
@@ -481,7 +481,10 @@
|
||||
"options": "AboutSettingsView acepta una composición de enlaces de versión y soporte. VersionCheckRowView muestra checking/result y solicita comprobaciones con onCheck. El punto de entrada gestiona las comprobaciones reales y los enlaces de diagnóstico.",
|
||||
"error": "No se pudo obtener la versión. Inténtalo de nuevo.",
|
||||
"state": "Estado de versión",
|
||||
"selectedLink": "Enlace de GitHub seleccionado"
|
||||
"selectedLink": "Enlace de GitHub seleccionado",
|
||||
"preferenceSaved": "Preferencia de ejemplo guardada; no se instalará ni reiniciará nada.",
|
||||
"updateRequested": "Revisión de la actualización seleccionada; esta vista previa no instala ni reinicia nada.",
|
||||
"dismissed": "Aviso de actualización ocultado"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "Preferencias de apariencia",
|
||||
|
||||
@@ -481,7 +481,10 @@
|
||||
"options": "AboutSettingsView accepte la composition des liens de version et d’assistance. VersionCheckRowView affiche checking/result et demande une vérification via onCheck. Le point d’entrée gère les vérifications réelles et les liens de diagnostic.",
|
||||
"error": "Impossible d’obtenir la version. Réessayez.",
|
||||
"state": "État de la version",
|
||||
"selectedLink": "Lien GitHub sélectionné"
|
||||
"selectedLink": "Lien GitHub sélectionné",
|
||||
"preferenceSaved": "Préférence d’exemple enregistrée ; rien ne sera installé ni redémarré.",
|
||||
"updateRequested": "Examen de la mise à jour sélectionné ; cet aperçu n’installe ni ne redémarre rien.",
|
||||
"dismissed": "Avis de mise à jour masqué"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "Préférences d’apparence",
|
||||
|
||||
@@ -481,7 +481,10 @@
|
||||
"options": "AboutSettingsView menerima gabungan tautan versi dan dukungan. VersionCheckRowView menampilkan checking/result dan meminta pemeriksaan melalui onCheck. Titik masuk fitur mengelola pemeriksaan sebenarnya serta data tautan diagnostik.",
|
||||
"error": "Tidak dapat mengambil informasi versi. Coba lagi.",
|
||||
"state": "Status versi",
|
||||
"selectedLink": "Tautan GitHub dipilih"
|
||||
"selectedLink": "Tautan GitHub dipilih",
|
||||
"preferenceSaved": "Preferensi contoh disimpan; tidak ada yang akan diinstal atau dimulai ulang.",
|
||||
"updateRequested": "Peninjauan pembaruan dipilih; pratinjau ini tidak menginstal atau memulai ulang apa pun.",
|
||||
"dismissed": "Pemberitahuan pembaruan ditutup"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "Preferensi tampilan",
|
||||
|
||||
@@ -481,7 +481,10 @@
|
||||
"options": "AboutSettingsView はバージョンとサポートリンクの組み合わせを受け取ります。VersionCheckRowView は checking/result を表示し、onCheck で確認を要求します。実際の確認と診断リンクのデータは機能の入口が管理します。",
|
||||
"error": "バージョン情報を取得できませんでした。再試行してください。",
|
||||
"state": "バージョンの状態",
|
||||
"selectedLink": "GitHub リンクを選択しました"
|
||||
"selectedLink": "GitHub リンクを選択しました",
|
||||
"preferenceSaved": "サンプル設定を保存しました。インストールや再起動は行いません。",
|
||||
"updateRequested": "更新の確認を選択しました。このプレビューではインストールや再起動は行いません。",
|
||||
"dismissed": "更新通知を閉じました"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "表示設定",
|
||||
|
||||
@@ -481,7 +481,10 @@
|
||||
"options": "AboutSettingsView는 버전과 지원 링크 조합을 받습니다. VersionCheckRowView는 checking/result를 표시하며 onCheck로 검사를 요청합니다. 실제 검사와 진단 링크 데이터는 기능 진입점이 담당합니다.",
|
||||
"error": "버전 정보를 가져올 수 없습니다. 다시 시도하세요.",
|
||||
"state": "버전 상태",
|
||||
"selectedLink": "GitHub 링크를 선택했습니다"
|
||||
"selectedLink": "GitHub 링크를 선택했습니다",
|
||||
"preferenceSaved": "예시 설정을 저장했습니다. 설치하거나 다시 시작하지 않습니다.",
|
||||
"updateRequested": "업데이트 검토를 선택했습니다. 이 미리보기에서는 설치하거나 다시 시작하지 않습니다.",
|
||||
"dismissed": "업데이트 알림을 닫았습니다"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "화면 환경설정",
|
||||
|
||||
@@ -481,7 +481,10 @@
|
||||
"options": "AboutSettingsView aceita uma composição de links de versão e suporte. VersionCheckRowView exibe checking/result e solicita verificações por onCheck. O ponto de entrada gerencia as verificações reais e os dados dos links de diagnóstico.",
|
||||
"error": "Não foi possível obter a versão. Tente novamente.",
|
||||
"state": "Estado da versão",
|
||||
"selectedLink": "Link do GitHub selecionado"
|
||||
"selectedLink": "Link do GitHub selecionado",
|
||||
"preferenceSaved": "Preferência de exemplo salva; nada será instalado ou reiniciado.",
|
||||
"updateRequested": "Revisão da atualização selecionada; esta prévia não instala nem reinicia nada.",
|
||||
"dismissed": "Aviso de atualização dispensado"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "Preferências de aparência",
|
||||
|
||||
@@ -481,7 +481,10 @@
|
||||
"options": "AboutSettingsView nhận tổ hợp liên kết phiên bản và hỗ trợ. VersionCheckRowView hiển thị checking/result và yêu cầu kiểm tra qua onCheck. Điểm vào tính năng quản lý kiểm tra thực tế và dữ liệu liên kết chẩn đoán.",
|
||||
"error": "Không thể lấy thông tin phiên bản. Hãy thử lại.",
|
||||
"state": "Trạng thái phiên bản",
|
||||
"selectedLink": "Đã chọn liên kết GitHub"
|
||||
"selectedLink": "Đã chọn liên kết GitHub",
|
||||
"preferenceSaved": "Đã lưu tùy chọn mẫu; sẽ không cài đặt hay khởi động lại.",
|
||||
"updateRequested": "Đã chọn xem xét bản cập nhật; bản xem trước này không cài đặt hay khởi động lại.",
|
||||
"dismissed": "Đã ẩn thông báo cập nhật"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "Tùy chọn giao diện",
|
||||
|
||||
@@ -481,7 +481,10 @@
|
||||
"options": "AboutSettingsView 接受版本与支持链接的组合。VersionCheckRowView 展示 checking/result,并通过 onCheck 请求检查。真实检查与诊断链接数据由功能入口负责。",
|
||||
"error": "无法获取版本信息,请重试。",
|
||||
"state": "版本状态",
|
||||
"selectedLink": "选择了 GitHub 链接"
|
||||
"selectedLink": "选择了 GitHub 链接",
|
||||
"preferenceSaved": "已保存示例偏好;不会安装或重启。",
|
||||
"updateRequested": "已选择查看更新;组件预览不会安装或重启。",
|
||||
"dismissed": "已收起更新提示"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "外观选项",
|
||||
|
||||
@@ -481,7 +481,10 @@
|
||||
"options": "AboutSettingsView 接受版本與支援連結的組合。VersionCheckRowView 顯示 checking/result,並透過 onCheck 請求檢查。實際檢查與診斷連結資料由功能入口負責。",
|
||||
"error": "無法取得版本資訊,請重試。",
|
||||
"state": "版本狀態",
|
||||
"selectedLink": "已選取 GitHub 連結"
|
||||
"selectedLink": "已選取 GitHub 連結",
|
||||
"preferenceSaved": "已儲存範例偏好;不會安裝或重新啟動。",
|
||||
"updateRequested": "已選擇查看更新;元件預覽不會安裝或重新啟動。",
|
||||
"dismissed": "已收起更新提示"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "外觀選項",
|
||||
|
||||
@@ -9,6 +9,7 @@ import { AutomationRunDialogView, type AutomationRunResult } from "@/components/
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
|
||||
import { DEFAULT_LOCAL_PREFS } from "@/lib/local-preferences";
|
||||
import type { UpdateChannel } from "@/lib/api";
|
||||
import type { AutomationChatsPayload, SessionAutomationJob } from "@/lib/types";
|
||||
import { StatePicker, type ComponentExample } from "./example";
|
||||
import { useGalleryTranslation } from "./i18n";
|
||||
@@ -68,17 +69,25 @@ function ChatBindingPreview() {
|
||||
|
||||
function AboutPreview() {
|
||||
const { t } = useGalleryTranslation();
|
||||
const [mode, setMode] = useState<"ready" | "checking" | "up-to-date" | "update" | "error">("ready");
|
||||
const [selectedLink, setSelectedLink] = useState(false);
|
||||
const [mode, setMode] = useState<"ready" | "checking" | "up-to-date" | "update" | "preview" | "error">("ready");
|
||||
const [notice, setNotice] = useState<"updateRequested" | "selectedLink" | null>(null);
|
||||
const [channel, setChannel] = useState<UpdateChannel>("stable");
|
||||
const result: VersionCheckState = mode === "up-to-date" ? { type: mode }
|
||||
: mode === "update" ? { type: mode, latestVersion: "0.3.6", pypiUrl: "https://pypi.org/project/nanobot-ai/" }
|
||||
: mode === "preview" ? { type: "update", latestVersion: "0.3.7.dev2026101501",
|
||||
releaseUrl: "https://github.com/HKUDS/nanobot/releases" }
|
||||
: mode === "error" ? { type: mode, message: t("controls.about.error") } : null;
|
||||
return <><StatePicker label={t("controls.about.state")} value={mode} options={["ready", "checking", "up-to-date", "update", "error"]} onChange={setMode} />
|
||||
return <><StatePicker label={t("controls.about.state")} value={mode} options={["ready", "checking", "up-to-date", "update", "preview", "error"]} onChange={setMode} />
|
||||
<AboutSettingsView reportIssueUrl="https://github.com/HKUDS/nanobot/issues/new?template=bug_report.yml"
|
||||
versionCheck={<VersionCheckRowView currentVersion="0.3.5" currentCommit="abcdef1234567890" checking={mode === "checking"}
|
||||
result={result} onCheck={() => setMode("update")} />}
|
||||
starLink={<StarLinkView onActivate={() => setSelectedLink(true)} />} />
|
||||
{selectedLink ? <p role="status" className="mt-4 text-xs text-muted-foreground">{t("controls.about.selectedLink")}</p> : null}</>;
|
||||
result={result} onCheck={() => setMode("update")}
|
||||
releaseStatus={{ channel, revision: 0, currentVersion: "0.3.5", state: "current" }}
|
||||
canChangeChannel onChangeChannel={async (value) => {
|
||||
setChannel(value);
|
||||
}}
|
||||
onRequestUpdate={mode === "preview" ? () => setNotice("updateRequested") : undefined} />}
|
||||
starLink={<StarLinkView onActivate={() => setNotice("selectedLink")} />} />
|
||||
{notice ? <p role="status" className="mt-4 text-xs text-muted-foreground">{t(`controls.about.${notice}`)}</p> : null}</>;
|
||||
}
|
||||
|
||||
function AppearancePreview() {
|
||||
|
||||
Reference in new issue
Block a user