feat: update notice after a server update, keep the open tab on reload, chunked Whisper in Quick Dump, compact emoji picker
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m31s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sandrodachandClaude Opus 5.5 committed 2026-11-01 15:09:21 +01:00
1 parent 20b907078f
commit 55112b940c
17 files changed
+250 -61

No files matched your search

+17 -10
View File
@@ -73,18 +73,14 @@ import { CommandPalette } from './components/CommandPalette';
import { AppFooter } from './components/AppFooter';
import { ThemeQuickPicker } from './components/ThemeQuickPicker';
import { AboutModal } from './components/AboutModal';
import { UpdateAvailableModal } from './components/UpdateAvailableModal';
import { useUpdateCheck } from './lib/useUpdateCheck';
import { consumePendingShares, formatSharedThought } from './lib/shareTarget';
import { APP_VERSION } from './version';
import { readViewSession, writeViewSession } from './lib/viewSession';
type ActiveTab =
| 'triage'
| 'tasks'
| 'workspace'
| 'lists'
| 'groups'
| 'user_settings'
| 'admin_settings'
| 'help';
const APP_TABS = ['triage', 'tasks', 'workspace', 'lists', 'groups', 'user_settings', 'admin_settings', 'help'] as const;
type ActiveTab = (typeof APP_TABS)[number];
interface ErrorBoundaryState {
hasError: boolean;
@@ -170,7 +166,15 @@ export const App: React.FC = () => {
});
const [deck, setDeck] = useState<Thought[]>([]);
const [lists, setLists] = useState<SharedList[]>([]);
const [activeTab, setActiveTab] = useState<ActiveTab>('triage');
// The open tab survives a reload of this browser tab (lib/viewSession); a new tab starts at the triage
const [activeTab, setActiveTab] = useState<ActiveTab>(() => {
const tab = readViewSession<{ tab: ActiveTab }>('app').tab;
return tab && APP_TABS.includes(tab) ? tab : 'triage';
});
useEffect(() => writeViewSession('app', { tab: activeTab }), [activeTab]);
useEffect(() => {
if (user && user.role !== 'admin' && activeTab === 'admin_settings') setActiveTab('triage');
}, [user, activeTab]);
const [previousTab, setPreviousTab] = useState<ActiveTab>('triage');
const [selectedDocId, setSelectedDocId] = useState<string | null>(null);
const [selectedBlockId, setSelectedBlockId] = useState<string | null>(null);
@@ -184,6 +188,7 @@ export const App: React.FC = () => {
const [showProfileMenu, setShowProfileMenu] = useState(false);
const serverOnline = useServerOnline();
const [showAbout, setShowAbout] = useState(false);
const { update: availableUpdate, dismiss: dismissUpdate } = useUpdateCheck();
const dropdownRef = useRef<HTMLDivElement | null>(null);
// Mobile Navigation & Quick-Action State
@@ -197,6 +202,7 @@ export const App: React.FC = () => {
const mobileBaseVoiceRef = useRef('');
// Voice input of the mobile capture sheet: own Whisper server or the browser (lib/voice.ts)
const mobileVoice = useVoiceInput({
chunked: true,
onText: (text) => {
if (!text) return;
const base = mobileBaseVoiceRef.current;
@@ -1877,6 +1883,7 @@ export const App: React.FC = () => {
/>
{showAbout && <AboutModal onClose={() => setShowAbout(false)} />}
{availableUpdate && <UpdateAvailableModal update={availableUpdate} onLater={dismissUpdate} />}
</div>
);
};