From 7b7cde274f639a530cf2a94bd5dc26a366174c4d Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 20 Oct 2026 23:17:43 +0000 Subject: [PATCH] feat(addons): make the Voice add-on one page with tabs The Voice add-on had four pages: recognition, library, create and speech, and the drawer listed two of them. It now has one page, "voice", and one drawer entry. Recognition, Library, Text to speech and From a recording are tabs of that page, drawn with the same tab strip the recognition page already used. The tab is the first path segment (voice/library), as in the Studio add-on, and the form that adds a voice is a view of the Library tab (voice/library/new). The old page names stay declared in the manifest. Each one redirects to its tab and keeps the query string, so saved links still open. Assisted-by: Claude Code:claude-sonnet-5-5 node Signed-off-by: Ettore Di Giacinto --- addons/voice/manifest.json | 6 +- addons/voice/ui/src/Speech.jsx | 3 +- addons/voice/ui/src/VoiceHub.jsx | 72 ++++++++++++++++++++++ addons/voice/ui/src/VoiceLibrary.jsx | 9 ++- addons/voice/ui/src/VoiceProfileCreate.jsx | 9 +-- addons/voice/ui/src/VoiceRecognition.jsx | 43 +++---------- addons/voice/ui/src/i18n/en.js | 7 ++- addons/voice/ui/src/index.jsx | 20 +++++- addons/voice/ui/src/style.css | 4 ++ 9 files changed, 125 insertions(+), 48 deletions(-) create mode 100644 addons/voice/ui/src/VoiceHub.jsx diff --git a/addons/voice/manifest.json b/addons/voice/manifest.json index a0d6d9277..3a3eb1d68 100644 --- a/addons/voice/manifest.json +++ b/addons/voice/manifest.json @@ -14,9 +14,9 @@ "entry": "ui/voice.js", "css": ["ui/voice.css"], "sdk": { "min": 2, "max": 2 }, - "pages": ["recognition", "library", "create", "speech"], - "navigation": ["speech", "library"], - "mainPage": "recognition", + "pages": ["voice", "recognition", "library", "create", "speech"], + "navigation": ["voice"], + "mainPage": "voice", "icon": "ui/icon.png", "title": "Voice", "description": "Recognise who is speaking, keep the voices that text-to-speech can use, and speak text with them." diff --git a/addons/voice/ui/src/Speech.jsx b/addons/voice/ui/src/Speech.jsx index b0f0f10e6..e3550cc0d 100644 --- a/addons/voice/ui/src/Speech.jsx +++ b/addons/voice/ui/src/Speech.jsx @@ -6,7 +6,7 @@ export function createSpeech(ctx) { const { h, t, ui, hooks, viewer } = ctx const { useState, useEffect, useMemo } = ctx.React - function Speech({ path }) { + function Speech({ path, tabs }) { const [model, setModel] = useState(ctx.modelFrom(path)) const [models, setModels] = useState({ status: 'loading', list: [] }) const [profiles, setProfiles] = useState([]) @@ -57,6 +57,7 @@ export function createSpeech(ctx) { return (
+ {tabs}