feat(sidebar): 后台激活的页面不再顶掉读者,改为标记未读红点

维护者在 #817 上批准了「后台自动激活不接管右侧栏」的行为,并要求同批补上
「后台新开了页面」的提示:事件不能丢,但也不能把读者正在看的页面顶走。

行为:
- 被门控跳过的那次激活仍然创建任务管理页,只是不再抢焦点
  (`OpenTabSeed.reveal: false` → 宿主 `revealIfOpened: false`,即
  「放置但不聚焦」;页面类型本来就没有自己的聚焦路径,已经存在的页面
  再开一次也只是一次聚焦,正是门控要拒绝的那件事)。
- 该页在原生右栏芯片与插件底部工作台对应页签上显示一个静态小红点
  (`aria-label` = 新词条 `tabUnread`,颜色取既有 `--dsw-alias-danger`)。
- 读者切到该页即清除标记:底部工作台走 service.activateTab;原生栏的
  点击插件看不见(`ISidebarRight` 只有 `active()` 读取器,没有选中事件流),
  所以由宿主自己的芯片按 `tab.visible` 清除——非可见芯片不清除,
  否则宿主为每个展开页签都画标题,红点刚亮就会被抹掉。
- 标记存进会话状态的 `unread: TabType[]`(随布局持久化,跨挂载/跨会话/
  刷新都在),两个承载面读同一份,不会各自为政。

文案:20 份词典同批更新两条设置项描述(门控行为变了)+ 新增 `tabUnread`
词条(ja 真日文)。

测试:`tests/sidebar-auto-activation.spec.tsx` 的门控两条改为断言
「页面仍创建 + revealIfOpened:false + 标记出现」,并加红点生命周期与
「已在任务页/正常激活不标红」三条;新增 `tests/native-tab-unread.spec.tsx`
钉住原生芯片这一承载面(画点、按 visible 清除、非可见不清除、别的类型
不串味、不破坏可访问名)。判别性用 6 处镜像还原逐条证伪(见报告)。
This commit is contained in:
Menghuan1918 committed 2026-10-05 23:03:40 +08:00
1 parent 9c18f05441
commit de1e76e2f5
33 files changed
+654 -57

No files matched your search

+10
View File
@@ -33,6 +33,7 @@ import { referenceInChat as referenceInChatShared } from './reference-in-chat.ts
import { DockFallback } from './sidebar/dock-fallback.tsx'
import {
BOTTOM_MIN, CONVERSATION_MIN,
isUnread,
leafWithTab, moveTab, moveTabToEdge, openDiffTab, resizeSplitIn,
setBottomHeight, toggleBottomPanel, toggleExpanded,
type DropZone, type SidebarStore, type SidebarTab,
@@ -657,6 +658,14 @@ export function Sidebar(props: { ctx: Context; store: SidebarStore }) {
return <span className={css.tabBadge}>{text}</span>
}
/**
* Whether one workbench tab carries the unread dot: its page holds
* background work the reader has not looked at yet. Reads the SAME session
* state the native chip does, so the two carriers cannot disagree, and the
* shell re-renders on the store change that sets or retires the mark.
*/
const isTabUnread = (tab: SidebarTab): boolean => isUnread(state, tab.type)
/**
* The active tab's right-aligned action area from the tab-type registry:
* a descriptor that declares `rightActions` supplies its own toolbar
@@ -795,6 +804,7 @@ export function Sidebar(props: { ctx: Context; store: SidebarStore }) {
renderTab={renderTab}
getTabIcon={tabIconOf}
getTabBadge={tabBadgeOf}
isTabUnread={isTabUnread}
getTabRightActions={tabRightActionsOf}
onRevealInFileManager={revealTabFile}
/>
+19
View File
@@ -69,6 +69,14 @@ export function TabBar(props: {
/** Badge resolver for tab labels (reads the descriptor's `badge`; the
* resolver returns the rendered pill or null). */
getTabBadge?: (tab: SidebarTab) => ReactNode
/**
* Unread resolver for tab labels: the page has something the reader has not
* looked at yet (a background activation opened it without taking the column
* over). Rendered as a small dot beside the label; `false`/undefined draws
* nothing, so a strip with no marks is byte-identical to one that never had
* the feature.
*/
isTabUnread?: (tab: SidebarTab) => boolean
/**
* Right-aligned action area resolver for the active tab: returns a
* ReactNode rendered at the tab strip's right end (between the + button
@@ -91,6 +99,7 @@ export function TabBar(props: {
}) {
const {
paneId, tabs, active, onActivate, onClose, onNewTab, newTabOptions, onDropTab, getTabIcon, getTabBadge, getTabRightActions,
isTabUnread,
onRevealInFileManager,
} = props
const [menuOpen, setMenuOpen] = useState(false)
@@ -251,6 +260,16 @@ export function TabBar(props: {
{getTabIcon?.(tab) ?? null}
{getTabBadge?.(tab) ?? null}
<span className={css.tabTitle}>{tab.title}</span>
{isTabUnread?.(tab) === true
? (
<span
className={css.tabUnreadDot}
role="img"
aria-label={t('tabUnread')}
title={t('tabUnread')}
/>
)
: null}
<button
type="button"
className={css.tabClose}
+3 -2
View File
@@ -118,6 +118,7 @@ export const ar: Record<string, string> = {
brokenSymlink: 'رابط رمزي معطوب',
close: 'إغلاق',
closeOtherTabs: 'إغلاق التبويبات الأخرى',
tabUnread: 'هناك صفحة جديدة لم تطّلع عليها بعد',
closeLeftTabs: 'إغلاق التبويبات على اليسار',
closeRightTabs: 'إغلاق التبويبات على اليمين',
closeAllTabs: 'إغلاق كل التبويبات',
@@ -304,9 +305,9 @@ export const ar: Record<string, string> = {
binaryNoPreview: 'لا يمكن معاينة هذا النوع من الملفات',
downloadToView: 'تنزيل للعرض',
settingsSubagentTitle: 'تفعيل صفحة المهام تلقائياً عند ظهور وكيل فرعي',
settingsSubagentDesc: 'تُفعَّل صفحة المهام عندما تُنشئ المحادثة الحالية وكيلاً فرعياً جديداً؛ في الشاشات العريضة تُوسَّع البطاقة الجانبية أيضاً، أما في الشاشات الضيقة فلا يُفرض فتح الدرج بملء الشاشة؛ عند إيقاف الخيار يصبح الفتح يدوياً',
settingsSubagentDesc: 'عندما تُنشئ المحادثة الحالية وكيلاً فرعياً جديداً، تُنشأ صفحة المهام في البطاقة الجانبية وتُعلَّم بنقطة غير مقروءة؛ وإذا كانت البطاقة الجانبية مفتوحة على صفحة أخرى فلا تُستولى عليها — انقر النقطة للانتقال إليها؛ وفي الشاشات العريضة تُوسَّع البطاقة الجانبية أيضاً، أما في الشاشات الضيقة فلا يُفرض فتح الدرج بملء الشاشة؛ أوقف الخيار للتوقف عن إنشائها تلقائياً',
settingsJobsTitle: 'تفعيل صفحة المهام تلقائياً عند ظهور مهمة خلفية جديدة',
settingsJobsDesc: 'تُفعَّل صفحة المهام كلما ظهرت مهمة خلفية جديدة للمحادثة الحالية (كل مهمة جديدة تُطلق التفعيل)؛ في الشاشات العريضة تُوسَّع البطاقة الجانبية أيضاً، أما في الشاشات الضيقة فلا يُفرض فتح الدرج بملء الشاشة؛ عند إيقاف الخيار يصبح الفتح يدوياً',
settingsJobsDesc: 'عند ظهور مهمة خلفية جديدة للمحادثة الحالية، تُنشأ صفحة المهام في البطاقة الجانبية وتُعلَّم بنقطة غير مقروءة (كل مهمة جديدة تُطلق الإنشاء)؛ وإذا كانت البطاقة الجانبية مفتوحة على صفحة أخرى فلا تُستولى عليها — انقر النقطة للانتقال إليها؛ وفي الشاشات العريضة تُوسَّع البطاقة الجانبية أيضاً، أما في الشاشات الضيقة فلا يُفرض فتح الدرج بملء الشاشة؛ أوقف الخيار للتوقف عن إنشائها تلقائياً',
settingsToolsTitle: 'حقن أدوات الطرفية للنموذج',
settingsToolsDesc: 'عند التفعيل، يمكن للنموذج إنشاء وتشغيل طرفيات الشريط الجانبي عبر أدوات terminal_* الثمانية (معطّل افتراضياً)',
settingsBottomTerminalTitle: 'فتح طرفية تلقائياً عند أول توسيع للوحة السفلية',
+3 -2
View File
@@ -103,6 +103,7 @@ export const de: Record<string, string> = {
brokenSymlink: 'Defekter Symlink',
close: 'Schließen',
closeOtherTabs: 'Andere Tabs schließen',
tabUnread: 'Es gibt eine neue, noch nicht angesehene Seite',
closeLeftTabs: 'Tabs links schließen',
closeRightTabs: 'Tabs rechts schließen',
closeAllTabs: 'Alle Tabs schließen',
@@ -289,9 +290,9 @@ export const de: Record<string, string> = {
binaryNoPreview: 'Dieser Dateityp kann nicht in der Vorschau angezeigt werden',
downloadToView: 'Zum Ansehen herunterladen',
settingsSubagentTitle: 'Aufgaben-Seite bei einem neuen Subagenten automatisch aktivieren',
settingsSubagentDesc: 'Die Aufgaben-Seite aktivieren, wenn die aktuelle Unterhaltung einen neuen Subagenten erzeugt; auf breiten Ansichten wird zusätzlich die Seitenkarte ausgeklappt, auf schmalen Ansichten wird das Öffnen der Vollbild-Schublade nicht erzwungen; ausschalten, um sie manuell zu öffnen',
settingsSubagentDesc: 'Wenn die aktuelle Unterhaltung einen neuen Subagenten erzeugt, wird die Aufgaben-Seite in der Seitenkarte angelegt und mit einem Ungelesen-Punkt markiert; eine Seitenkarte, die bereits eine andere Seite zeigt, wird nicht übernommen – ein Klick auf den Punkt führt dorthin; auf breiten Ansichten wird zusätzlich die Seitenkarte ausgeklappt, auf schmalen Ansichten wird das Öffnen der Vollbild-Schublade nicht erzwungen; ausschalten, um sie nicht mehr automatisch anzulegen',
settingsJobsTitle: 'Aufgaben-Seite bei einer neuen Hintergrundaufgabe automatisch aktivieren',
settingsJobsDesc: 'Die Aufgaben-Seite aktivieren, sobald für die aktuelle Unterhaltung eine neue Hintergrundaufgabe erscheint (jede neue Aufgabe löst dies aus); auf breiten Ansichten wird zusätzlich die Seitenkarte ausgeklappt, auf schmalen Ansichten wird das Öffnen der Vollbild-Schublade nicht erzwungen; ausschalten, um sie manuell zu öffnen',
settingsJobsDesc: 'Sobald für die aktuelle Unterhaltung eine neue Hintergrundaufgabe erscheint, wird die Aufgaben-Seite in der Seitenkarte angelegt und mit einem Ungelesen-Punkt markiert (jede neue Aufgabe löst dies aus); eine Seitenkarte, die bereits eine andere Seite zeigt, wird nicht übernommen – ein Klick auf den Punkt führt dorthin; auf breiten Ansichten wird zusätzlich die Seitenkarte ausgeklappt, auf schmalen Ansichten wird das Öffnen der Vollbild-Schublade nicht erzwungen; ausschalten, um sie nicht mehr automatisch anzulegen',
settingsToolsTitle: 'Terminal-Werkzeuge für das Modell bereitstellen',
settingsToolsDesc: 'Wenn aktiviert, kann das Modell über die 8 terminal_*-Werkzeuge Terminale in der Seitenleiste erstellen und steuern (standardmäßig deaktiviert)',
settingsBottomTerminalTitle: 'Beim ersten Ausklappen des unteren Panels automatisch ein Terminal öffnen',
+3 -2
View File
@@ -110,6 +110,7 @@ export const fr: Record<string, string> = {
brokenSymlink: 'Lien symbolique cassé',
close: 'Fermer',
closeOtherTabs: 'Fermer les autres onglets',
tabUnread: 'Une nouvelle page non consultée est disponible',
closeLeftTabs: 'Fermer les onglets à gauche',
closeRightTabs: 'Fermer les onglets à droite',
closeAllTabs: 'Fermer tous les onglets',
@@ -296,9 +297,9 @@ export const fr: Record<string, string> = {
binaryNoPreview: 'Ce type de fichier ne prend pas en charge l’aperçu',
downloadToView: 'Télécharger pour consulter',
settingsSubagentTitle: 'Activer automatiquement la page Gestion des tâches lorsqu’un sous-agent apparaît',
settingsSubagentDesc: 'Lorsqu’un nouveau sous-agent est créé dans la session actuelle, activer la page Gestion des tâches ; sur les écrans larges, déployer également la carte latérale ; sur les écrans étroits, ne pas forcer l’ouverture du tiroir plein écran ; une fois l’option désactivée, l’ouverture est manuelle',
settingsSubagentDesc: 'Lorsqu’un nouveau sous-agent est créé dans la session actuelle, la page Gestion des tâches est créée dans la carte latérale et marquée d’un point non lu ; une carte latérale déjà déployée sur une autre page n’est pas reprise — cliquez sur le point pour vous y rendre ; sur les écrans larges, la carte latérale est aussi déployée, tandis que sur les écrans étroits le tiroir plein écran n’est pas ouvert de force ; désactivez pour ne plus la créer automatiquement',
settingsJobsTitle: 'Activer automatiquement la page Gestion des tâches à l’arrivée d’une tâche d’arrière-plan',
settingsJobsDesc: 'À chaque nouvelle tâche d’arrière-plan dans la session actuelle, activer la page Gestion des tâches (chaque nouvelle tâche déclenche l’activation) ; sur les écrans larges, déployer également la carte latérale ; sur les écrans étroits, ne pas forcer l’ouverture du tiroir plein écran ; une fois l’option désactivée, l’ouverture est manuelle',
settingsJobsDesc: 'À chaque nouvelle tâche d’arrière-plan dans la session actuelle, la page Gestion des tâches est créée dans la carte latérale et marquée d’un point non lu (chaque nouvelle tâche déclenche l’action) ; une carte latérale déjà déployée sur une autre page n’est pas reprise — cliquez sur le point pour vous y rendre ; sur les écrans larges, la carte latérale est aussi déployée, tandis que sur les écrans étroits le tiroir plein écran n’est pas ouvert de force ; désactivez pour ne plus la créer automatiquement',
settingsToolsTitle: 'Injecter des outils de terminal au modèle',
settingsToolsDesc: 'Une fois activé, le modèle peut créer et piloter des terminaux de la barre latérale via les 8 outils terminal_* (désactivé par défaut)',
settingsBottomTerminalTitle: 'Ouvrir automatiquement un terminal au premier déploiement du panneau inférieur',
+3 -2
View File
@@ -117,6 +117,7 @@ export const hi: Record<string, string> = {
brokenSymlink: 'टूटा सिमलिंक',
close: 'बंद करें',
closeOtherTabs: 'अन्य टैब बंद करें',
tabUnread: 'एक नया पृष्ठ है जिसे आपने अभी तक नहीं देखा',
closeLeftTabs: 'बाएँ टैब बंद करें',
closeRightTabs: 'दाएँ टैब बंद करें',
closeAllTabs: 'सभी टैब बंद करें',
@@ -303,9 +304,9 @@ export const hi: Record<string, string> = {
binaryNoPreview: 'इस फ़ाइल प्रकार का पूर्वावलोकन नहीं हो सकता',
downloadToView: 'देखने के लिए डाउनलोड करें',
settingsSubagentTitle: 'सबएजेंट दिखने पर कार्य पृष्ठ स्वतः सक्रिय करें',
settingsSubagentDesc: 'वर्तमान वार्तालाप में नया सबएजेंट बनने पर कार्य पृष्ठ सक्रिय करें; चौड़ी स्क्रीन पर साइड कार्ड भी विस्तृत होता है, जबकि संकीर्ण स्क्रीन पर पूर्ण-स्क्रीन दराज को जबरन नहीं खोला जाता; विकल्प बंद होने पर इसे मैन्युअल रूप से खोलना होगा',
settingsSubagentDesc: 'जब वर्तमान वार्तालाप नया सबएजेंट बनाता है, तो साइड कार्ड में कार्य पृष्ठ बनाया जाता है और उस पर अपठित बिंदु लगाया जाता है; किसी अन्य पृष्ठ पर खुला साइड कार्ड अधिग्रहित नहीं किया जाता — वहाँ जाने के लिए बिंदु पर क्लिक करें; चौड़ी स्क्रीन पर साइड कार्ड भी विस्तृत होता है, जबकि संकीर्ण स्क्रीन पर पूर्ण-स्क्रीन दराज जबरन नहीं खोली जाती; स्वतः बनाना बंद करने के लिए इसे बंद करें',
settingsJobsTitle: 'नया बैकग्राउंड कार्य आने पर कार्य पृष्ठ स्वतः सक्रिय करें',
settingsJobsDesc: 'वर्तमान वार्तालाप में हर नया बैकग्राउंड कार्य आने पर कार्य पृष्ठ सक्रिय करें (हर नया कार्य ट्रिगर करता है); चौड़ी स्क्रीन पर साइड कार्ड भी विस्तृत होता है, जबकि संकीर्ण स्क्रीन पर पूर्ण-स्क्रीन दराज को जबरन नहीं खोला जाता; विकल्प बंद होने पर इसे मैन्युअल रूप से खोलना होगा',
settingsJobsDesc: 'वर्तमान वार्तालाप में हर नया बैकग्राउंड कार्य आने पर साइड कार्ड में कार्य पृष्ठ बनाया जाता है और उस पर अपठित बिंदु लगाया जाता है (हर नया कार्य ट्रिगर करता है); किसी अन्य पृष्ठ पर खुला साइड कार्ड अधिग्रहित नहीं किया जाता — वहाँ जाने के लिए बिंदु पर क्लिक करें; चौड़ी स्क्रीन पर साइड कार्ड भी विस्तृत होता है, जबकि संकीर्ण स्क्रीन पर पूर्ण-स्क्रीन दराज जबरन नहीं खोली जाती; स्वतः बनाना बंद करने के लिए इसे बंद करें',
settingsToolsTitle: 'मॉडल के लिए टर्मिनल टूल इंजेक्ट करें',
settingsToolsDesc: 'सक्षम होने पर, मॉडल 8 terminal_* टूल्स से साइडबार टर्मिनल बना और चला सकता है (डिफ़ॉल्ट रूप से बंद)',
settingsBottomTerminalTitle: 'निचला पैनल पहली बार खुलने पर स्वतः टर्मिनल खोलें',
+3 -2
View File
@@ -115,6 +115,7 @@ export const id: Record<string, string> = {
brokenSymlink: 'Symlink rusak',
close: 'Tutup',
closeOtherTabs: 'Tutup Tab Lain',
tabUnread: 'Ada halaman baru yang belum Anda lihat',
closeLeftTabs: 'Tutup Tab di Kiri',
closeRightTabs: 'Tutup Tab di Kanan',
closeAllTabs: 'Tutup Semua Tab',
@@ -301,9 +302,9 @@ export const id: Record<string, string> = {
binaryNoPreview: 'Tipe berkas ini tidak dapat dipratinjau',
downloadToView: 'Unduh untuk melihat',
settingsSubagentTitle: 'Aktifkan otomatis halaman Tasks saat subagen muncul',
settingsSubagentDesc: 'Aktifkan halaman Tasks saat obrolan saat ini membuat subagen baru; pada layar lebar, kartu samping juga dibentangkan; pada layar sempit, laci layar penuh tidak dipaksa terbuka; matikan untuk membukanya secara manual',
settingsSubagentDesc: 'Saat obrolan saat ini membuat subagen baru, halaman Tasks dibuat di kartu samping dan ditandai titik belum dibaca; kartu samping yang sudah terbuka pada halaman lain tidak diambil alih — klik titiknya untuk ke sana; pada layar lebar kartu samping juga dibentangkan, sedangkan pada layar sempit laci layar penuh tidak dipaksa terbuka; matikan untuk berhenti membuatnya otomatis',
settingsJobsTitle: 'Aktifkan otomatis halaman Tasks saat ada tugas latar baru',
settingsJobsDesc: 'Aktifkan halaman Tasks setiap kali tugas latar baru muncul untuk obrolan saat ini (setiap tugas baru memicu aktivasi); pada layar lebar, kartu samping juga dibentangkan; pada layar sempit, laci layar penuh tidak dipaksa terbuka; matikan untuk membukanya secara manual',
settingsJobsDesc: 'Setiap kali tugas latar baru muncul untuk obrolan saat ini, halaman Tasks dibuat di kartu samping dan ditandai titik belum dibaca (setiap tugas baru memicu); kartu samping yang sudah terbuka pada halaman lain tidak diambil alih — klik titiknya untuk ke sana; pada layar lebar kartu samping juga dibentangkan, sedangkan pada layar sempit laci layar penuh tidak dipaksa terbuka; matikan untuk berhenti membuatnya otomatis',
settingsToolsTitle: 'Suntik alat terminal untuk model',
settingsToolsDesc: 'Saat diaktifkan, model dapat membuat dan mengendalikan terminal sidebar melalui 8 alat terminal_* (nonaktif secara default)',
settingsBottomTerminalTitle: 'Buka terminal otomatis saat panel bawah pertama kali dibentangkan',
+3 -2
View File
@@ -108,6 +108,7 @@ export const it: Record<string, string> = {
brokenSymlink: 'Collegamento simbolico interrotto',
close: 'Chiudi',
closeOtherTabs: 'Chiudi le altre schede',
tabUnread: 'C’è una nuova pagina non ancora visualizzata',
closeLeftTabs: 'Chiudi le schede a sinistra',
closeRightTabs: 'Chiudi le schede a destra',
closeAllTabs: 'Chiudi tutte le schede',
@@ -294,9 +295,9 @@ export const it: Record<string, string> = {
binaryNoPreview: 'Questo tipo di file non può essere visualizzato in anteprima',
downloadToView: 'Scarica per visualizzare',
settingsSubagentTitle: 'Attiva automaticamente la pagina Attività quando compare un sottoagente',
settingsSubagentDesc: 'Quando nella conversazione attuale compare un nuovo sottoagente, attiva automaticamente la pagina Attività; sugli schermi ampi espande anche la barra laterale, mentre sugli schermi stretti non forza l’apertura del pannello a schermo intero; disattiva per selezionare la pagina manualmente',
settingsSubagentDesc: 'Quando nella conversazione attuale compare un nuovo sottoagente, la pagina Attività viene creata nella scheda laterale e contrassegnata con un punto non letto; una scheda laterale già espansa su un’altra pagina non viene occupata — fai clic sul punto per andarci; sugli schermi ampi viene espansa anche la barra laterale, mentre sugli schermi stretti il pannello a schermo intero non viene forzato; disattiva per smettere di crearla automaticamente',
settingsJobsTitle: 'Attiva automaticamente la pagina Attività quando compare una nuova attività in background',
settingsJobsDesc: 'Quando nella conversazione attuale compare una nuova attività in background, attiva automaticamente la pagina Attività (l’attivazione avviene per ogni nuova attività); sugli schermi ampi espande anche la barra laterale, mentre sugli schermi stretti non forza l’apertura del pannello a schermo intero; disattiva per selezionare la pagina manualmente',
settingsJobsDesc: 'Quando nella conversazione attuale compare una nuova attività in background, la pagina Attività viene creata nella scheda laterale e contrassegnata con un punto non letto (l’attivazione avviene per ogni nuova attività); una scheda laterale già espansa su un’altra pagina non viene occupata — fai clic sul punto per andirci; sugli schermi ampi viene espansa anche la barra laterale, mentre sugli schermi stretti il pannello a schermo intero non viene forzato; disattiva per smettere di crearla automaticamente',
settingsToolsTitle: 'Inietta strumenti del terminale per il modello',
settingsToolsDesc: 'Se attivato, il modello può creare e gestire terminali della barra laterale attraverso gli 8 strumenti terminal_* (disattivato per impostazione predefinita)',
settingsBottomTerminalTitle: 'Apri automaticamente un terminale alla prima espansione del pannello inferiore',
+3 -2
View File
@@ -117,6 +117,7 @@ export const ja: Record<string, string> = {
brokenSymlink: '無効なシンボリックリンク',
close: '閉じる',
closeOtherTabs: '他のタブを閉じる',
tabUnread: '未読の新しいページがあります',
closeLeftTabs: '左のタブを閉じる',
closeRightTabs: '右のタブを閉じる',
closeAllTabs: 'すべてのタブを閉じる',
@@ -303,9 +304,9 @@ export const ja: Record<string, string> = {
binaryNoPreview: 'このファイル形式はプレビューできません',
downloadToView: 'ダウンロードして表示',
settingsSubagentTitle: 'サブエージェント検出時にタスク管理ページを自動的にアクティブ化',
settingsSubagentDesc: '現在の会話で新しいサブエージェントが発生した際にタスク管理ページをアクティブ化する。広い画面ではサイドカードも展開するが、狭い画面では全画面ドロワーを強制的に開かない。オフにすると手動で開く必要がある',
settingsSubagentDesc: '現在の会話で新しいサブエージェントが発生したとき、サイドカードにタスク管理ページを作成し未読ドットを表示する。右カラムが別のページを展開中の場合はフォーカスを奪わない(ドットをクリックすれば移動できる)。広い画面ではサイドカードも展開するが、狭い画面では全画面ドロワーを強制的に開かない。オフにすると自動作成しない',
settingsJobsTitle: '新規バックグラウンドタスク時にタスク管理ページを自動的にアクティブ化',
settingsJobsDesc: '現在の会話で新しいバックグラウンドタスクが発生するたびにタスク管理ページをアクティブ化する(新規タスクごとに発火)。広い画面ではサイドカードも展開するが、狭い画面では全画面ドロワーを強制的に開かない。オフにすると手動で開く必要がある',
settingsJobsDesc: '現在の会話で新しいバックグラウンドタスクが発生するたびに、サイドカードにタスク管理ページを作成し未読ドットを表示する(新規タスクごとに発火)。右カラムが別のページを展開中の場合はフォーカスを奪わない(ドットをクリックすれば移動できる)。広い画面ではサイドカードも展開するが、狭い画面では全画面ドロワーを強制的に開かない。オフにすると自動作成しない',
settingsToolsTitle: 'モデルにターミナルツールを注入',
settingsToolsDesc: 'オンにすると、モデルが terminal_create 等 8 個のツールでサイドバーターミナルを作成・操作可能(デフォルトオフ)',
settingsBottomTerminalTitle: '下パネル初回展開時に自動でターミナルを開く',
+3 -2
View File
@@ -109,6 +109,7 @@ export const ko: Record<string, string> = {
brokenSymlink: '깨진 심볼릭 링크',
close: '닫기',
closeOtherTabs: '다른 탭 닫기',
tabUnread: '확인하지 않은 새 페이지가 있습니다',
closeLeftTabs: '왼쪽 탭 닫기',
closeRightTabs: '오른쪽 탭 닫기',
closeAllTabs: '모든 탭 닫기',
@@ -295,9 +296,9 @@ export const ko: Record<string, string> = {
binaryNoPreview: '이 파일 형식은 미리보기를 지원하지 않습니다',
downloadToView: '다운로드하여 보기',
settingsSubagentTitle: '서브 에이전트를 감지하면 작업 관리 페이지 자동 활성화',
settingsSubagentDesc: '현재 대화에 새 서브 에이전트가 생기면 작업 관리 페이지를 활성화합니다. 넓은 화면에서는 사이드 카드도 펼치지만, 좁은 화면에서는 전체 화면 드로어를 강제로 열지 않습니다. 끄면 수동으로 열어야 합니다',
settingsSubagentDesc: '현재 대화에서 새 서브 에이전트가 생기면 사이드 카드에 작업 관리 페이지를 만들고 읽지 않음 점을 표시합니다. 오른쪽 열이 다른 페이지를 펼쳐 둔 경우에는 포커스를 빼앗지 않습니다(점을 클릭하면 이동). 넓은 화면에서는 사이드 카드도 펼치지만, 좁은 화면에서는 전체 화면 드로어를 강제로 열지 않습니다. 끄면 자동으로 만들지 않습니다',
settingsJobsTitle: '새 백그라운드 작업이 생기면 작업 관리 페이지 자동 활성화',
settingsJobsDesc: '현재 대화에 새 백그라운드 작업이 생길 때마다 작업 관리 페이지를 활성화합니다(새 작업마다 트리거됨). 넓은 화면에서는 사이드 카드도 펼치지만, 좁은 화면에서는 전체 화면 드로어를 강제로 열지 않습니다. 끄면 수동으로 열어야 합니다',
settingsJobsDesc: '현재 대화에 새 백그라운드 작업이 생길 때마다 사이드 카드에 작업 관리 페이지를 만들고 읽지 않음 점을 표시합니다(새 작업마다 트리거됨). 오른쪽 열이 다른 페이지를 펼쳐 둔 경우에는 포커스를 빼앗지 않습니다(점을 클릭하면 이동). 넓은 화면에서는 사이드 카드도 펼치지만, 좁은 화면에서는 전체 화면 드로어를 강제로 열지 않습니다. 끄면 자동으로 만들지 않습니다',
settingsToolsTitle: '모델에 터미널 도구 주입',
settingsToolsDesc: '켜면 모델이 terminal_create 등 8개 도구로 사이드바 터미널을 만들고 조작할 수 있습니다(기본 꺼짐)',
settingsBottomTerminalTitle: '하단 패널을 처음 펼칠 때 터미널 자동 열기',
+3 -2
View File
@@ -115,6 +115,7 @@ export const nl: Record<string, string> = {
brokenSymlink: 'Gebroken symlink',
close: 'Sluiten',
closeOtherTabs: 'Andere tabbladen sluiten',
tabUnread: 'Er is een nieuwe pagina die u nog niet heeft bekeken',
closeLeftTabs: 'Tabbladen links sluiten',
closeRightTabs: 'Tabbladen rechts sluiten',
closeAllTabs: 'Alle tabbladen sluiten',
@@ -301,9 +302,9 @@ export const nl: Record<string, string> = {
binaryNoPreview: 'Dit bestandstype kan niet worden gepreviewed',
downloadToView: 'Downloaden om te bekijken',
settingsSubagentTitle: 'Activeer de Taken-pagina automatisch wanneer een subagent verschijnt',
settingsSubagentDesc: 'Wanneer de huidige conversatie een nieuwe subagent start, wordt de Taken-pagina automatisch geactiveerd; op brede schermen wordt ook de zijkaart uitgeklapt, terwijl op smalle schermen het schuifpaneel op volledig scherm niet geforceerd wordt geopend; schakel uit om de pagina handmatig te selecteren',
settingsSubagentDesc: 'Wanneer de huidige conversatie een nieuwe subagent start, wordt de Taken-pagina in de zijkaart aangemaakt en met een ongelezen punt gemarkeerd; een zijkaart die al een andere pagina toont, wordt niet overgenomen — klik op het punt om erheen te gaan; op brede schermen wordt ook de zijkaart uitgeklapt, terwijl op smalle schermen het schuifpaneel op volledig scherm niet geforceerd wordt geopend; schakel uit om hem niet meer automatisch aan te maken',
settingsJobsTitle: 'Activeer de Taken-pagina automatisch bij een nieuwe achtergrondtaak',
settingsJobsDesc: 'Wanneer er voor de huidige conversatie een nieuwe achtergrondtaak verschijnt, wordt de Taken-pagina automatisch geactiveerd (dit gebeurt bij elke nieuwe taak); op brede schermen wordt ook de zijkaart uitgeklapt, terwijl op smalle schermen het schuifpaneel op volledig scherm niet geforceerd wordt geopend; schakel uit om de pagina handmatig te selecteren',
settingsJobsDesc: 'Wanneer er voor de huidige conversatie een nieuwe achtergrondtaak verschijnt, wordt de Taken-pagina in de zijkaart aangemaakt en met een ongelezen punt gemarkeerd (dit gebeurt bij elke nieuwe taak); een zijkaart die al een andere pagina toont, wordt niet overgenomen — klik op het punt om erheen te gaan; op brede schermen wordt ook de zijkaart uitgeklapt, terwijl op smalle schermen het schuifpaneel op volledig scherm niet geforceerd wordt geopend; schakel uit om hem niet meer automatisch aan te maken',
settingsToolsTitle: 'Terminaltools voor het model injecteren',
settingsToolsDesc: 'Indien ingeschakeld kan het model zijbalk-terminals aanmaken en besturen via de 8 terminal_*-tools (standaard uit)',
settingsBottomTerminalTitle: 'Automatisch een terminal openen bij de eerste uitklap van het onderpaneel',
+3 -2
View File
@@ -119,6 +119,7 @@ export const pl: Record<string, string> = {
brokenSymlink: 'Uszkodzone dowiązanie symboliczne',
close: 'Zamknij',
closeOtherTabs: 'Zamknij inne karty',
tabUnread: 'Jest nowa, jeszcze nieobejrzana strona',
closeLeftTabs: 'Zamknij karty po lewej',
closeRightTabs: 'Zamknij karty po prawej',
closeAllTabs: 'Zamknij wszystkie karty',
@@ -305,9 +306,9 @@ export const pl: Record<string, string> = {
binaryNoPreview: 'Tego typu pliku nie można wyświetlić w podglądzie',
downloadToView: 'Pobierz, aby zobaczyć',
settingsSubagentTitle: 'Automatycznie aktywuj stronę „Zadania” po pojawieniu się podagenta',
settingsSubagentDesc: 'Gdy w bieżącej rozmowie pojawi się nowy podagent, automatycznie aktywuj stronę „Zadania”; na szerokich ekranach rozwiń także panel boczny, a na wąskich nie wymuszaj otwarcia pełnoekranowego panelu; wyłącz, aby wybierać stronę ręcznie',
settingsSubagentDesc: 'Gdy w bieżącej rozmowie pojawi się nowy podagent, strona „Zadania” zostaje utworzona na karcie bocznej i oznaczona kropką nieprzeczytania; karta boczna rozwinięta już na innej stronie nie jest przejmowana — kliknij kropkę, aby tam przejść; na szerokich ekranach rozwijany jest także panel boczny, a na wąskich nie wymusza się otwarcia pełnoekranowego panelu; wyłącz, aby przestać tworzyć ją automatycznie',
settingsJobsTitle: 'Automatycznie aktywuj stronę „Zadania” po pojawieniu się nowego zadania w tle',
settingsJobsDesc: 'Gdy w bieżącej rozmowie pojawi się nowe zadanie w tle, automatycznie aktywuj stronę „Zadania” (akcja jest wyzwalana przez każde nowe zadanie); na szerokich ekranach rozwiń także panel boczny, a na wąskich nie wymuszaj otwarcia pełnoekranowego panelu; wyłącz, aby wybierać stronę ręcznie',
settingsJobsDesc: 'Gdy w bieżącej rozmowie pojawi się nowe zadanie w tle, strona „Zadania” zostaje utworzona na karcie bocznej i oznaczona kropką nieprzeczytania (akcja jest wyzwalana przez każde nowe zadanie); karta boczna rozwinięta już na innej stronie nie jest przejmowana — kliknij kropkę, aby tam przejść; na szerokich ekranach rozwijany jest także panel boczny, a na wąskich nie wymusza się otwarcia pełnoekranowego panelu; wyłącz, aby przestać tworzyć ją automatycznie',
settingsToolsTitle: 'Wstrzyknij narzędzia terminala dla modelu',
settingsToolsDesc: 'Po włączeniu model może tworzyć i sterować terminalami panelu bocznego przez 8 narzędzi terminal_* (domyślnie wyłączone)',
settingsBottomTerminalTitle: 'Automatycznie otwieraj terminal przy pierwszym rozwinięciu panelu dolnego',
+3 -2
View File
@@ -100,6 +100,7 @@ export const pt: Record<string, string> = {
brokenSymlink: 'Symlink quebrado',
close: 'Fechar',
closeOtherTabs: 'Fechar outras abas',
tabUnread: 'Há uma nova página ainda não vista',
closeLeftTabs: 'Fechar abas à esquerda',
closeRightTabs: 'Fechar abas à direita',
closeAllTabs: 'Fechar todas as abas',
@@ -286,9 +287,9 @@ export const pt: Record<string, string> = {
binaryNoPreview: 'Este tipo de arquivo não pode ser pré-visualizado',
downloadToView: 'Baixar para ver',
settingsSubagentTitle: 'Ativar automaticamente a página de Tarefas quando um subagente aparecer',
settingsSubagentDesc: 'Ativar a página de Tarefas quando a conversa atual gerar um novo subagente; em telas largas, expandir também o cartão lateral; em telas estreitas, não forçar a abertura da gaveta em tela cheia; desative para abri-la manualmente',
settingsSubagentDesc: 'Quando a conversa atual gerar um novo subagente, criar a página de Tarefas no cartão lateral e marcá-la com um ponto de não lido; um cartão lateral já aberto em outra página não é assumido — clique no ponto para ir até lá; em telas largas, o cartão lateral também é expandido, enquanto em telas estreitas a gaveta em tela cheia não é aberta à força; desative para parar de criá-la automaticamente',
settingsJobsTitle: 'Ativar automaticamente a página de Tarefas quando houver uma nova tarefa em segundo plano',
settingsJobsDesc: 'Ativar a página de Tarefas sempre que uma nova tarefa em segundo plano aparecer na conversa atual (cada nova tarefa aciona a ativação); em telas largas, expandir também o cartão lateral; em telas estreitas, não forçar a abertura da gaveta em tela cheia; desative para abri-la manualmente',
settingsJobsDesc: 'Sempre que uma nova tarefa em segundo plano aparecer na conversa atual, criar a página de Tarefas no cartão lateral e marcá-la com um ponto de não lido (cada nova tarefa aciona a criação); um cartão lateral já aberto em outra página não é assumido — clique no ponto para ir até lá; em telas largas, o cartão lateral também é expandido, enquanto em telas estreitas a gaveta em tela cheia não é aberta à força; desative para parar de criá-la automaticamente',
settingsToolsTitle: 'Injetar ferramentas de terminal para o modelo',
settingsToolsDesc: 'Quando ativado, o modelo pode criar e operar terminais da barra lateral por meio das 8 ferramentas terminal_* (desativado por padrão)',
settingsBottomTerminalTitle: 'Abrir um terminal automaticamente na primeira expansão do painel inferior',
+3 -2
View File
@@ -113,6 +113,7 @@ export const ru: Record<string, string> = {
brokenSymlink: 'Сломанная символическая ссылка',
close: 'Закрыть',
closeOtherTabs: 'Закрыть остальные вкладки',
tabUnread: 'Есть новая страница, которую вы ещё не открывали',
closeLeftTabs: 'Закрыть вкладки слева',
closeRightTabs: 'Закрыть вкладки справа',
closeAllTabs: 'Закрыть все вкладки',
@@ -300,9 +301,9 @@ export const ru: Record<string, string> = {
binaryNoPreview: 'Этот тип файла не поддерживает предпросмотр',
downloadToView: 'Скачать для просмотра',
settingsSubagentTitle: 'Автоматически активировать страницу «Задачи» при появлении субагента',
settingsSubagentDesc: 'При появлении нового субагента в текущей сессии автоматически активируется страница «Задачи»; на широких экранах также разворачивается боковая панель, а на узких экранах полноэкранная выдвижная панель не открывается принудительно; отключите, чтобы выбирать страницу вручную',
settingsSubagentDesc: 'При появлении нового субагента в текущей сессии страница «Задачи» создаётся в боковой панели и помечается точкой непрочитанного; панель, уже развёрнутая на другой странице, не перехватывается — нажмите на точку, чтобы перейти; на широких экранах боковая панель также разворачивается, а на узких полноэкранная выдвижная панель не открывается принудительно; отключите, чтобы страница больше не создавалась автоматически',
settingsJobsTitle: 'Автоматически активировать страницу «Задачи» при появлении новой фоновой задачи',
settingsJobsDesc: 'При появлении новой фоновой задачи в текущей сессии автоматически активируется страница «Задачи» (срабатывает для каждой новой задачи); на широких экранах также разворачивается боковая панель, а на узких экранах полноэкранная выдвижная панель не открывается принудительно; отключите, чтобы выбирать страницу вручную',
settingsJobsDesc: 'При появлении новой фоновой задачи в текущей сессии страница «Задачи» создаётся в боковой панели и помечается точкой непрочитанного (срабатывает для каждой новой задачи); панель, уже развёрнутая на другой странице, не перехватывается — нажмите на точку, чтобы перейти; на широких экранах боковая панель также разворачивается, а на узких полноэкранная выдвижная панель не открывается принудительно; отключите, чтобы страница больше не создавалась автоматически',
settingsToolsTitle: 'Внедрить терминальные инструменты для модели',
settingsToolsDesc: 'Если включено, модель может через 8 инструментов (terminal_create и др.) создавать терминалы боковой панели и управлять ими (по умолчанию выключено)',
settingsBottomTerminalTitle: 'Автооткрытие терминала при первом разворачивании нижней панели',
+3 -2
View File
@@ -100,6 +100,7 @@ export const sv: Record<string, string> = {
brokenSymlink: 'Bruten symbolisk länk',
close: 'Stäng',
closeOtherTabs: 'Stäng andra flikar',
tabUnread: 'Det finns en ny sida som du inte har tittat på',
closeLeftTabs: 'Stäng flikar till vänster',
closeRightTabs: 'Stäng flikar till höger',
closeAllTabs: 'Stäng alla flikar',
@@ -286,9 +287,9 @@ export const sv: Record<string, string> = {
binaryNoPreview: 'Denna filtyp kan inte förhandsgranskas',
downloadToView: 'Ladda ner för att visa',
settingsSubagentTitle: 'Aktivera sidan Uppgifter automatiskt när en subagent dyker upp',
settingsSubagentDesc: 'När den aktuella konversationen skapar en ny subagent aktiveras sidan Uppgifter automatiskt; på breda skärmar expanderas även sidokortet, medan helskärmspanelen inte tvingas öppnas på smala skärmar; stäng av för att välja sidan manuellt',
settingsSubagentDesc: 'När den aktuella konversationen skapar en ny subagent skapas sidan Uppgifter i sidokortet och markeras med en oläst punkt; ett sidokort som redan visar en annan sida tas inte över — klicka på punkten för att gå dit; på breda skärmar expanderas även sidokortet, medan helskärmspanelen inte tvingas öppnas på smala skärmar; stäng av för att sluta skapa den automatiskt',
settingsJobsTitle: 'Aktivera sidan Uppgifter automatiskt vid ett nytt bakgrundsjobb',
settingsJobsDesc: 'När ett nytt bakgrundsjobb dyker upp för den aktuella konversationen aktiveras sidan Uppgifter automatiskt (detta sker för varje nytt jobb); på breda skärmar expanderas även sidokortet, medan helskärmspanelen inte tvingas öppnas på smala skärmar; stäng av för att välja sidan manuellt',
settingsJobsDesc: 'När ett nytt bakgrundsjobb dyker upp för den aktuella konversationen skapas sidan Uppgifter i sidokortet och markeras med en oläst punkt (detta sker för varje nytt jobb); ett sidokort som redan visar en annan sida tas inte över — klicka på punkten för att gå dit; på breda skärmar expanderas även sidokortet, medan helskärmspanelen inte tvingas öppnas på smala skärmar; stäng av för att sluta skapa den automatiskt',
settingsToolsTitle: 'Injicera terminalverktyg för modellen',
settingsToolsDesc: 'När aktiverat kan modellen skapa och styra sidopanelsterminaler via de 8 terminal_*-verktygen (av som standard)',
settingsBottomTerminalTitle: 'Öppna automatiskt en terminal vid bottenpanelens första expandering',
+3 -2
View File
@@ -117,6 +117,7 @@ export const th: Record<string, string> = {
brokenSymlink: 'Symlink เสีย',
close: 'ปิด',
closeOtherTabs: 'ปิด Tab อื่น',
tabUnread: 'มีหน้าใหม่ที่คุณยังไม่ได้ดู',
closeLeftTabs: 'ปิด Tab ด้านซ้าย',
closeRightTabs: 'ปิด Tab ด้านขวา',
closeAllTabs: 'ปิด Tab ทั้งหมด',
@@ -303,9 +304,9 @@ export const th: Record<string, string> = {
binaryNoPreview: 'ไม่สามารถพรีวิวประเภทไฟล์นี้ได้',
downloadToView: 'ดาวน์โหลดเพื่อดู',
settingsSubagentTitle: 'เลือกหน้า Tasks โดยอัตโนมัติเมื่อมีตัวแทนย่อยปรากฏ',
settingsSubagentDesc: 'เมื่อแชทปัจจุบันสร้างตัวแทนย่อยใหม่ ระบบจะเลือกหน้า Tasks โดยอัตโนมัติ; ในมุมมองแบบกว้าง ระบบจะขยายการ์ดด้านข้างด้วย ส่วนในมุมมองแบบแคบ ระบบจะไม่บังคับเปิดลิ้นชักเต็มหน้าจอ; ปิดเพื่อเลือกหน้าด้วยตนเอง',
settingsSubagentDesc: 'เมื่อแชทปัจจุบันสร้างตัวแทนย่อยใหม่ ระบบจะสร้างหน้า Tasks ในการ์ดด้านข้างและทำเครื่องหมายจุดยังไม่ได้อ่าน; หากการ์ดด้านข้างเปิดหน้าอื่นอยู่ ระบบจะไม่แย่งไป — คลิกจุดเพื่อไปที่นั่น; ในมุมมองแบบกว้าง ระบบจะขยายการ์ดด้านข้างด้วย ส่วนในมุมมองแบบแคบ ระบบจะไม่บังคับเปิดลิ้นชักเต็มหน้าจอ; ปิดเพื่อหยุดสร้างโดยอัตโนมัติ',
settingsJobsTitle: 'เลือกหน้า Tasks โดยอัตโนมัติเมื่อมีงานเบื้องหลังใหม่',
settingsJobsDesc: 'เมื่อมีงานเบื้องหลังใหม่ปรากฏในแชทปัจจุบัน ระบบจะเลือกหน้า Tasks โดยอัตโนมัติ (ทุกงานใหม่จะทริกเกอร์); ในมุมมองแบบกว้าง ระบบจะขยายการ์ดด้านข้างด้วย ส่วนในมุมมองแบบแคบ ระบบจะไม่บังคับเปิดลิ้นชักเต็มหน้าจอ; ปิดเพื่อเลือกหน้าด้วยตนเอง',
settingsJobsDesc: 'เมื่อมีงานเบื้องหลังใหม่ปรากฏในแชทปัจจุบัน ระบบจะสร้างหน้า Tasks ในการ์ดด้านข้างและทำเครื่องหมายจุดยังไม่ได้อ่าน (ทุกงานใหม่จะทริกเกอร์); หากการ์ดด้านข้างเปิดหน้าอื่นอยู่ ระบบจะไม่แย่งไป — คลิกจุดเพื่อไปที่นั่น; ในมุมมองแบบกว้าง ระบบจะขยายการ์ดด้านข้างด้วย ส่วนในมุมมองแบบแคบ ระบบจะไม่บังคับเปิดลิ้นชักเต็มหน้าจอ; ปิดเพื่อหยุดสร้างโดยอัตโนมัติ',
settingsToolsTitle: 'ฉีดเครื่องมือเทอร์มินัลสำหรับโมเดล',
settingsToolsDesc: 'เมื่อเปิดใช้ โมเดลสามารถสร้างและควบคุมเทอร์มินัลแถบด้านข้างผ่านเครื่องมือ terminal_* 8 ตัว (ปิดเป็นค่าเริ่มต้น)',
settingsBottomTerminalTitle: 'เปิดเทอร์มินัลอัตโนมัติเมื่อพาเนลล่างขยายครั้งแรก',
+3 -2
View File
@@ -117,6 +117,7 @@ export const tr: Record<string, string> = {
brokenSymlink: 'Bozuk sembolik bağ',
close: 'Kapat',
closeOtherTabs: 'Diğer sekmeleri kapat',
tabUnread: 'Henüz bakmadığınız yeni bir sayfa var',
closeLeftTabs: 'Soldaki sekmeleri kapat',
closeRightTabs: 'Sağdaki sekmeleri kapat',
closeAllTabs: 'Tüm sekmeleri kapat',
@@ -303,9 +304,9 @@ export const tr: Record<string, string> = {
binaryNoPreview: 'Bu dosya türü önizlenemiyor',
downloadToView: 'Görüntülemek için indir',
settingsSubagentTitle: 'Bir alt aracı belirdiğinde Görevler sayfasını otomatik etkinleştir',
settingsSubagentDesc: 'Geçerli sohbet yeni bir alt aracı oluşturduğunda Görevler sayfasını etkinleştir; geniş ekranlarda yan kart da genişletilir, dar ekranlarda tam ekran çekmecesi zorla açılmaz; kapalıyken elle açılması gerekir',
settingsSubagentDesc: 'Geçerli sohbet yeni bir alt aracı oluşturduğunda Görevler sayfası yan kartta oluşturulur ve okunmamış noktasıyla işaretlenir; başka bir sayfada açık olan yan kart ele geçirilmez — oraya gitmek için noktaya tıklayın; geniş ekranlarda yan kart da genişletilir, dar ekranlarda tam ekran çekmecesi zorla açılmaz; otomatik oluşturmayı durdurmak için kapatın',
settingsJobsTitle: 'Yeni bir arka plan işi belirdiğinde Görevler sayfasını otomatik etkinleştir',
settingsJobsDesc: 'Geçerli sohbette her yeni arka plan işi belirdiğinde Görevler sayfasını etkinleştir (her yeni iş tetikler); geniş ekranlarda yan kart da genişletilir, dar ekranlarda tam ekran çekmecesi zorla açılmaz; kapalıyken elle açılması gerekir',
settingsJobsDesc: 'Geçerli sohbette her yeni arka plan işi belirdiğinde Görevler sayfası yan kartta oluşturulur ve okunmamış noktasıyla işaretlenir (her yeni iş tetikler); başka bir sayfada açık olan yan kart ele geçirilmez — oraya gitmek için noktaya tıklayın; geniş ekranlarda yan kart da genişletilir, dar ekranlarda tam ekran çekmecesi zorla açılmaz; otomatik oluşturmayı durdurmak için kapatın',
settingsToolsTitle: 'Model için terminal araçları enjekte et',
settingsToolsDesc: 'Etkinleştirildiğinde model, 8 terminal_* aracı üzerinden kenar çubuğu terminalleri oluşturup kullanabilir (varsayılan kapalı)',
settingsBottomTerminalTitle: 'Alt panelin ilk genişletilmesinde otomatik terminal aç',
+3 -2
View File
@@ -117,6 +117,7 @@ export const vi: Record<string, string> = {
brokenSymlink: 'Symlink hỏng',
close: 'Đóng',
closeOtherTabs: 'Đóng các tab khác',
tabUnread: 'Có một trang mới bạn chưa xem',
closeLeftTabs: 'Đóng tab bên trái',
closeRightTabs: 'Đóng tab bên phải',
closeAllTabs: 'Đóng tất cả tab',
@@ -303,9 +304,9 @@ export const vi: Record<string, string> = {
binaryNoPreview: 'Loại tệp này không hỗ trợ xem trước',
downloadToView: 'Tải xuống để xem',
settingsSubagentTitle: 'Tự động kích hoạt trang Quản lý tác vụ khi phát hiện tác nhân con',
settingsSubagentDesc: 'Khi phiên hiện tại tạo tác nhân con mới, kích hoạt trang Quản lý tác vụ; trên màn hình rộng, thẻ bên cũng được mở rộng; trên màn hình hẹp, ngăn kéo toàn màn hình không bị ép mở; tắt để mở thủ công',
settingsSubagentDesc: 'Khi phiên hiện tại tạo tác nhân con mới, trang Quản lý tác vụ được tạo trong thẻ bên và đánh dấu chấm chưa đọc; thẻ bên đang mở ở trang khác sẽ không bị chiếm — bấm vào chấm để đến đó; trên màn hình rộng, thẻ bên cũng được mở rộng; trên màn hình hẹp, ngăn kéo toàn màn hình không bị ép mở; tắt để ngừng tạo tự động',
settingsJobsTitle: 'Tự động kích hoạt trang Quản lý tác vụ khi có tác vụ nền mới',
settingsJobsDesc: 'Mỗi khi phiên hiện tại có tác vụ nền mới, kích hoạt trang Quản lý tác vụ (mỗi tác vụ mới đều kích hoạt); trên màn hình rộng, thẻ bên cũng được mở rộng; trên màn hình hẹp, ngăn kéo toàn màn hình không bị ép mở; tắt để mở thủ công',
settingsJobsDesc: 'Mỗi khi phiên hiện tại có tác vụ nền mới, trang Quản lý tác vụ được tạo trong thẻ bên và đánh dấu chấm chưa đọc (mỗi tác vụ mới đều kích hoạt); thẻ bên đang mở ở trang khác sẽ không bị chiếm — bấm vào chấm để đến đó; trên màn hình rộng, thẻ bên cũng được mở rộng; trên màn hình hẹp, ngăn kéo toàn màn hình không bị ép mở; tắt để ngừng tạo tự động',
settingsToolsTitle: 'Tiêm công cụ terminal cho mô hình',
settingsToolsDesc: 'Khi bật, mô hình có thể tạo và điều khiển terminal thanh bên qua 8 công cụ terminal_* (mặc định tắt)',
settingsBottomTerminalTitle: 'Tự động mở terminal khi panel dưới mở rộng lần đầu',
+3 -2
View File
@@ -132,6 +132,7 @@ export const zhHK: Record<string, string> = {
brokenSymlink: '失效的符號連結',
close: '關閉',
closeOtherTabs: '關閉其他標籤',
tabUnread: '有未檢視的新頁面',
closeLeftTabs: '關閉左側標籤',
closeRightTabs: '關閉右側標籤',
closeAllTabs: '關閉全部標籤',
@@ -318,9 +319,9 @@ export const zhHK: Record<string, string> = {
binaryNoPreview: '此檔案類型不支援預覽',
downloadToView: '下載檢視',
settingsSubagentTitle: '偵測到子代理時自動選取任務管理頁',
settingsSubagentDesc: '目前工作階段產生新的子代理時,自動選取任務管理頁;寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後需手動選取',
settingsSubagentDesc: '目前工作階段產生新的子代理時,在側邊欄建立任務管理頁並標記未讀紅點;若右欄正展開在其他頁面則不搶焦點,點紅點即可前往;寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後不再自動建立',
settingsJobsTitle: '有新背景任務時自動選取任務管理頁',
settingsJobsDesc: '目前工作階段出現新的背景任務時,自動選取任務管理頁(每個新任務都會觸發);寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後需手動選取',
settingsJobsDesc: '目前工作階段出現新的背景任務時,在側邊欄建立任務管理頁並標記未讀紅點(每個新任務都會觸發);若右欄正展開在其他頁面則不搶焦點,點紅點即可前往;寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後不再自動建立',
settingsToolsTitle: '為模型注入終端工具',
settingsToolsDesc: '開啟後,模型可透過 terminal_create 等 8 個工具建立並操作側邊欄終端(預設關閉)',
settingsBottomTerminalTitle: '底部面板首次展開自動開終端',
+3 -2
View File
@@ -132,6 +132,7 @@ export const zhMO: Record<string, string> = {
brokenSymlink: '失效的符號連結',
close: '關閉',
closeOtherTabs: '關閉其他標籤',
tabUnread: '有未檢視的新頁面',
closeLeftTabs: '關閉左側標籤',
closeRightTabs: '關閉右側標籤',
closeAllTabs: '關閉全部標籤',
@@ -318,9 +319,9 @@ export const zhMO: Record<string, string> = {
binaryNoPreview: '此檔案類型不支援預覽',
downloadToView: '下載檢視',
settingsSubagentTitle: '偵測到子代理時自動選取任務管理頁',
settingsSubagentDesc: '目前工作階段產生新的子代理時,自動選取任務管理頁;寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後需手動選取',
settingsSubagentDesc: '目前工作階段產生新的子代理時,在側邊欄建立任務管理頁並標記未讀紅點;若右欄正展開在其他頁面則不搶焦點,點紅點即可前往;寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後不再自動建立',
settingsJobsTitle: '有新背景任務時自動選取任務管理頁',
settingsJobsDesc: '目前工作階段出現新的背景任務時,自動選取任務管理頁(每個新任務都會觸發);寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後需手動選取',
settingsJobsDesc: '目前工作階段出現新的背景任務時,在側邊欄建立任務管理頁並標記未讀紅點(每個新任務都會觸發);若右欄正展開在其他頁面則不搶焦點,點紅點即可前往;寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後不再自動建立',
settingsToolsTitle: '為模型注入終端工具',
settingsToolsDesc: '開啟後,模型可透過 terminal_create 等 8 個工具建立並操作側邊欄終端(預設關閉)',
settingsBottomTerminalTitle: '底部面板首次展開自動開終端',
+3 -2
View File
@@ -132,6 +132,7 @@ export const zhTW: Record<string, string> = {
brokenSymlink: '失效的符號連結',
close: '關閉',
closeOtherTabs: '關閉其他標籤',
tabUnread: '有未檢視的新頁面',
closeLeftTabs: '關閉左側標籤',
closeRightTabs: '關閉右側標籤',
closeAllTabs: '關閉全部標籤',
@@ -318,9 +319,9 @@ export const zhTW: Record<string, string> = {
binaryNoPreview: '此檔案類型不支援預覽',
downloadToView: '下載檢視',
settingsSubagentTitle: '偵測到子代理時自動選取任務管理頁',
settingsSubagentDesc: '目前工作階段產生新的子代理時,自動選取任務管理頁;寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後需手動選取',
settingsSubagentDesc: '目前工作階段產生新的子代理時,在側邊欄建立任務管理頁並標記未讀紅點;若右欄正展開在其他頁面則不搶焦點,點紅點即可前往;寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後不再自動建立',
settingsJobsTitle: '有新背景任務時自動選取任務管理頁',
settingsJobsDesc: '目前工作階段出現新的背景任務時,自動選取任務管理頁(每個新任務都會觸發);寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後需手動選取',
settingsJobsDesc: '目前工作階段出現新的背景任務時,在側邊欄建立任務管理頁並標記未讀紅點(每個新任務都會觸發);若右欄正展開在其他頁面則不搶焦點,點紅點即可前往;寬螢幕時亦會展開側邊欄,窄螢幕時不會強制開啟全螢幕抽屜;關閉後不再自動建立',
settingsToolsTitle: '為模型注入終端工具',
settingsToolsDesc: '開啟後,模型可透過 terminal_create 等 8 個工具建立並操作側邊欄終端(預設關閉)',
settingsBottomTerminalTitle: '底部面板首次展開自動開終端',
+4 -2
View File
@@ -129,6 +129,7 @@ export const zh = {
brokenSymlink: '失效的软链接',
close: '关闭',
closeOtherTabs: '关闭其他页签',
tabUnread: '有未查看的新页面',
closeLeftTabs: '关闭左侧页签',
closeRightTabs: '关闭右侧页签',
closeAllTabs: '关闭全部页签',
@@ -315,9 +316,9 @@ export const zh = {
binaryNoPreview: '此文件类型不支持预览',
downloadToView: '下载查看',
settingsSubagentTitle: '检测到子代理时自动激活任务管理页',
settingsSubagentDesc: '当前会话产生新的子代理时,自动激活任务管理页;宽屏同时展开侧边栏,窄屏不强制展开全屏抽屉;关闭后需手动打开',
settingsSubagentDesc: 'When the current conversation spawns a new subagent, create the Tasks page in the side card and mark it with an unread dot; a side card already expanded on another page is left alone instead of being taken over — click the dot to go there; wide viewports also expand the side card, while narrow full-screen drawers are not forced open; turn off to stop creating it automatically',
settingsJobsTitle: '有新后台任务时自动激活任务管理页',
settingsJobsDesc: '当前会话出现新的后台任务时,自动激活任务管理页(每个新任务都会触发);宽屏同时展开侧边栏,窄屏不强制展开全屏抽屉;关闭后需手动打开',
settingsJobsDesc: 'Whenever a new background job appears for the current conversation, create the Tasks page in the side card and mark it with an unread dot (every new job triggers); a side card already expanded on another page is left alone instead of being taken over — click the dot to go there; wide viewports also expand the side card, while narrow full-screen drawers are not forced open; turn off to stop creating it automatically',
settingsToolsTitle: '为模型注入终端工具',
settingsToolsDesc: '开启后,模型可通过 terminal_create 等 8 个工具创建并操作侧边栏终端(默认关闭)',
settingsBottomTerminalTitle: '底部面板首次展开自动开终端',
@@ -700,6 +701,7 @@ export const en: Record<keyof typeof zh, string> = {
brokenSymlink: 'Broken symlink',
close: 'Close',
closeOtherTabs: 'Close Other Tabs',
tabUnread: 'There is a new page you have not viewed',
closeLeftTabs: 'Close Tabs to the Left',
closeRightTabs: 'Close Tabs to the Right',
closeAllTabs: 'Close All Tabs',
+6
View File
@@ -257,6 +257,12 @@ export function createNativeSurface(ctx: Context, records: NativeTabRecords): Na
fileAddress(sessionId, cwd, path) {
return fileAddressFor(sessionId, cwd, path)
},
tabTypeOf(sessionId, tabId) {
// Read through the SESSION, like `close` above: one native id names a
// tab in every session, so a bare read can hand back another session's
// record and clear the wrong session's unread mark.
return records.get(sessionId, tabId)?.tab.type
},
close(sessionId, tabId) {
// Read through the SESSION: the same native id names a tab in every
// session, so a bare read can hand back another session's record.
+41 -3
View File
@@ -23,7 +23,7 @@
* Nothing here is a singleton: the registry is created once per client
* activation and handed to every registration.
*/
import { createElement, useMemo, useSyncExternalStore } from 'react'
import { createElement, useEffect, useMemo, useSyncExternalStore } from 'react'
import type { ComponentType, ReactNode } from 'react'
import type { Context } from '../../context-types.ts'
import type { SessionScope } from '../api.ts'
@@ -32,7 +32,8 @@ import { OrphanedTab } from '../OrphanedTab.tsx'
import { referenceInChat } from '../reference-in-chat.ts'
import { useSessionRoot } from '../use-session-root.ts'
import type { BetterSidebarService } from '../service.ts'
import { toggleExpanded } from '../state.ts'
import { t } from '../locales.ts'
import { isUnread, toggleExpanded } from '../state.ts'
import type { SidebarStore, SidebarTab, TabType } from '../state.ts'
import css from '../sidebar.module.css'
@@ -561,16 +562,53 @@ export function NativeTabTitle(props: NativeTitleInjected & NativeBodyFrameworkP
const glyph = icon ?? (typeof descriptor?.icon === 'function'
? descriptor.icon(CHIP_ICON_SIZE)
: descriptor?.icon)
if (glyph === undefined || glyph === null) return title
// "The reader has not looked at this page": the tab type this chip belongs
// to carries a mark (a background activation opened its page without taking
// the column over). The unread store subscription is what re-renders the
// chip when the mark appears or retires — the native record's own version
// does not move for either.
const unread = useSyncExternalStore(
listener => service.subscribeState(listener),
() => isUnread(service.getSnapshot().state, record?.tab.type ?? descriptorId),
)
// …and the chip is also what RETIRES the mark: this tab being visible means
// the reader is looking at its page now. Guarded on BOTH flags, so an
// inactive chip (the host draws every expanded tab's title) clears nothing
// and a chip with no mark never touches the store.
const type = record?.tab.type ?? descriptorId
const visible = nativeTab.visible === true
useEffect(() => {
if (visible && unread) service.clearUnread(type, sessionId)
}, [visible, unread, type, sessionId, service])
if (glyph === undefined || glyph === null) {
return unread ? <>{title}<UnreadDot /></> : title
}
return (
<>
{/* Decorative: the chip's accessible name stays the title. */}
<span className={css.chipIcon} aria-hidden="true">{glyph}</span>
{title}
{unread ? <UnreadDot /> : null}
</>
)
}
/**
* The native chip's unread mark. `role="img"` + a label so the dot is
* announced rather than skipped as decoration (the glyph beside it is the
* decorative one — `aria-hidden` — while this carries the state).
*/
function UnreadDot(): ReactNode {
return (
<span
className={css.chipUnread}
role="img"
aria-label={t('tabUnread')}
title={t('tabUnread')}
/>
)
}
/** The component pair one descriptor contributes to the native surface. */
export interface NativeTabComponents {
readonly body: ComponentType<NativeBodyInjected & NativeBodyFrameworkProps>
+64 -3
View File
@@ -457,6 +457,15 @@ export interface OpenTabSeed {
* `'side'` only changes where a path seed lands.
*/
target?: 'right' | 'bottom' | 'side'
/**
* Whether the open may FOCUS what it opens (`target: 'right'` only; the
* bottom workbench already lands everything in its own pane). Defaults to
* true — every consumer-facing open means "show me this". A background
* activation passes `false` so the reader's page survives: the host places
* the tab without the focus op, and the caller raises the unread dot in its
* place (see `src/client/sidebar/use-host-feeds.ts`).
*/
reveal?: boolean
}
/**
@@ -493,6 +502,13 @@ export interface SidebarSurface {
openResource(input: { sessionId: string; address: string; line?: number; revealIfOpened: boolean; preferNewPane?: boolean }): void
/** The file address of one path (the native surface owns the grammar). */
fileAddress(sessionId: string, cwd: string | undefined, path: string): string
/**
* The plugin tab type one native tab id belongs to, or undefined when this
* session has no such tab. Used to clear the unread dot when an activation
* lands on the native surface — the service cannot see the native records
* itself, and a tab id is not a type.
*/
tabTypeOf?(sessionId: string, tabId: string): string | undefined
/** Close one native tab; the closed record's type/title/meta, or undefined when the id is not native. */
close(sessionId: string, tabId: string): { type: string; title: string; meta?: unknown } | undefined
/**
@@ -651,6 +667,18 @@ export interface BetterSidebarService {
* reachable at all). `path` is taken with or without a leading slash.
*/
hostRouteUrl(path: string): string
/**
* Retire one session's "new page" dot for a tab type — the reader just
* looked at that page. A type that is not marked is a strict no-op, so a
* carrier can call this on every visibility change without churning the
* store.
*
* The mark itself is raised by the plugin's own background activation; this
* is the retirement half a carrier that renders a marked tab needs. The
* bottom workbench retires its marks through {@link activateTab} instead
* (a click there IS an activation), so the native chip is the caller.
*/
clearUnread(type: TabType, sessionId: string): void
/**
* Install (or clear) the native right-Sidebar write face.
* @internal Called once by the client half; not part of the consumer API.
@@ -771,6 +799,20 @@ export function createBetterSidebarService(store: SidebarStore): BetterSidebarSe
return () => { listeners.delete(listener) }
}
/**
* Retire one session's unread mark for a tab type. The argument ORDER is
* the service's own `(type, sessionId)` — this is the implementation of
* {@link BetterSidebarService.clearUnread} and takes its parameter list
* verbatim, so the facade cannot silently swap them.
*
* Named-session aware on purpose (see {@link SidebarStore.clearUnread}): the
* current session publishes the change so both carriers re-render, while a
* session that is not on screen is updated in place without waking the shell.
*/
const clearUnreadFor = (type: TabType, sessionId: string): void => {
store.clearUnread(type, sessionId)
}
const registerTab = (descriptor: TabDescriptor): (() => void) => {
if (tabs.has(descriptor.id)) {
throw new Error(`[dsh-better-sidebar] tab type "${descriptor.id}" already registered`)
@@ -988,6 +1030,11 @@ export function createBetterSidebarService(store: SidebarStore): BetterSidebarSe
// Multi-instance kinds (terminal / browser / side chat / diff) mint a
// fresh tab per open; single-instance kinds focus the existing one.
const revealIfOpened = descriptor.createTab === undefined
// Whether this open may FOCUS what it lands on. `target: 'side'` never
// does (it is a split beside the reader's page), and a background
// activation asks for the same without the split (`reveal: false`),
// which is what keeps a gated auto-open from taking the column over.
const reveal = seed.reveal !== false && !side
// A url seed lands on `path`: the browser tab reads its address from
// there and persists navigations back to the same field
// (BrowserView's `persist`), so dropping the seed left an opened tab
@@ -1014,12 +1061,12 @@ export function createBetterSidebarService(store: SidebarStore): BetterSidebarSe
surface.openResource({
sessionId: targetSessionId,
address: surface.fileAddress(targetSessionId, scope?.cwd, seed.path),
revealIfOpened: side ? false : true,
revealIfOpened: reveal,
...(side ? { preferNewPane: true } : {}),
})
} else {
// The path-less editor window IS the file explorer.
surface.openTab({ sessionId: targetSessionId, kind: 'files', params: {}, revealIfOpened: true })
surface.openTab({ sessionId: targetSessionId, kind: 'files', params: {}, revealIfOpened: reveal })
}
} else {
// A component type's path seed stays on the page open (regression
@@ -1035,7 +1082,7 @@ export function createBetterSidebarService(store: SidebarStore): BetterSidebarSe
...(seed.diff === undefined ? {} : { diff: seed.diff }),
...(synthetic.meta === undefined ? {} : { meta: synthetic.meta }),
},
revealIfOpened: side ? false : revealIfOpened,
revealIfOpened: reveal && revealIfOpened,
...(side ? { preferNewPane: true } : {}),
})
}
@@ -1201,6 +1248,18 @@ export function createBetterSidebarService(store: SidebarStore): BetterSidebarSe
/** Activate an open tab (the tab-bar activation path; fires onActivate). */
const activateTab = (tabId: string, scope?: SessionScope): void => {
// Activating a tab is the reader LOOKING at that page, so it retires the
// unread dot wherever the tab lives. Resolved before the activation
// because the native branch below returns early: the record (and therefore
// the type) is dropped when the tab unmounts. Nothing is marked unread in
// the target session by a cross-session activation (the service's own
// background triggers mark the session they are actually running for), so
// an unknown type clears nothing.
const activatedSessionId = scope?.sessionId ?? store.getSnapshot().sessionId
if (activatedSessionId !== undefined) {
const type = surface?.tabTypeOf?.(activatedSessionId, tabId)
if (type !== undefined) clearUnreadFor(type, activatedSessionId)
}
if (surface?.activate(tabId, scope?.sessionId) === true) return
let activated: SidebarTab | undefined
store.reduce((state) => {
@@ -1214,6 +1273,7 @@ export function createBetterSidebarService(store: SidebarStore): BetterSidebarSe
if (activated !== undefined) {
const sessionId = scope?.sessionId ?? store.getSnapshot().sessionId
if (sessionId !== undefined) {
clearUnreadFor(activated.type, sessionId)
const descriptor = tabs.get(activated.type)
// An explicit scope (with its optional cwd) rides to the callback.
safeCall(() => descriptor?.onActivate?.(activated!, scope ?? { sessionId }))
@@ -1263,6 +1323,7 @@ export function createBetterSidebarService(store: SidebarStore): BetterSidebarSe
openFile,
hostRouteUrl: (path: string): string => resolveHostRoute(path).href,
setSurface: (next: SidebarSurface | undefined) => { surface = next },
clearUnread: clearUnreadFor,
}
}
+24
View File
@@ -487,6 +487,30 @@ body[data-dsh-sidebar-dragging] .bottomPanel {
flex: none;
}
/* "This page has something you have not looked at": a small solid dot on the
tab, drawn on the native chip and on the bottom workbench strip alike. Static
by design — a pulsing marker on every new subagent is noise, and the two
carriers must read as the same thing. The chip is inline text (its content
IS the host's tab label), so the mark is an inline-block sitting on the text
baseline; the strip's own mark centres in its flex row instead. */
.chipUnread {
display: inline-block;
width: 6px;
height: 6px;
margin-left: 6px;
border-radius: 50%;
background: var(--dsw-alias-danger);
vertical-align: middle;
}
.tabUnreadDot {
flex: none;
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--dsw-alias-danger);
}
/* One tab's mounted content; inactive tabs stay mounted but hidden so
switching never tears down terminals/editors (state survives). */
.paneTab {
+30 -5
View File
@@ -75,14 +75,31 @@ interface NativeColumnFace {
* alone. A column already on the Tasks page is re-focused in place as before
* (single-instance semantics make it a no-op).
*
* Leaving it at that would DROP the event: the page the background work
* belongs to must still be created, it just may not take the column over.
* So a gated activation opens the same page with `reveal: false` — the host
* places the tab without focusing it (`openContent`'s `revealIfOpened: false`
* suppresses exactly the focus op; the page kind has no focus path of its own,
* and re-opening a page that IS already there is a focus either way, which is
* precisely what the gate refuses) — and marks the tab type unread, which is
* the dot the reader follows to it later. The two halves are one change:
* without the dot the tab would be created invisibly, and without the open
* there would be nothing for the dot to point at.
*
* @param ctx - the client context (`ctx.sidebarRight` + `ctx.betterSidebar`).
* @param store - the plugin store (the unread dot lives in the session state).
* @param sessionId - the session the feed reports the activity for.
* @param options.background - `true` for background activity (refuses a
* column the reader is using, parks on narrow viewports); `false` for the
* explicit topology jump-back, which is a user gesture and always leaves the
* column as the host expanded it.
*/
function activateTasksPage(ctx: Context, sessionId: string, options: { background: boolean }): void {
function activateTasksPage(
ctx: Context,
store: SidebarStore,
sessionId: string,
options: { background: boolean },
): void {
const column = ctx.get('sidebarRight') as unknown as NativeColumnFace | undefined
// The face acts on the MOUNTED session: both gates below are only meaningful
// (and only safe) when the activation targets the one on screen. "On screen"
@@ -94,7 +111,15 @@ function activateTasksPage(ctx: Context, sessionId: string, options: { backgroun
// Do not take over the page the reader is looking at (see the docblock).
if (options.background && onScreen && column?.isExpanded?.() === true) {
const shown = column.active?.()
if (shown !== undefined && shown.kind !== 'subagent') return
if (shown !== undefined && shown.kind !== 'subagent') {
// The page is still created — the event is never dropped — but it lands
// in the background and raises the dot instead of the column.
ctx.get('betterSidebar')?.openTab({ type: 'subagent', title: t('subagent'), reveal: false })
// The dot belongs to the session the work is in, which is the current
// one (the gate above proved this seat is the mounted session).
store.markUnread('subagent')
return
}
}
const park = options.background
&& onScreen
@@ -233,7 +258,7 @@ export function useHostFeeds(feeds: {
if (!store.getPrefs().autoOpenSubagent) return
if (store.getPrefs().mobileNoAutoOpen && isNarrowWidth(window.innerWidth)) return
if (ctx.get('betterSidebar')?.isTabEnabled('subagent') === false) return
activateTasksPage(ctx, sessionId, { background: true })
activateTasksPage(ctx, store, sessionId, { background: true })
}, AUTO_OPEN_DEBOUNCE_MS)
autoOpenPendingRef.current = { baseline, timer }
}, [sessionList, sessionId, store, ctx])
@@ -297,7 +322,7 @@ export function useHostFeeds(feeds: {
if (!store.getPrefs().autoOpenJobs) return
if (store.getPrefs().mobileNoAutoOpen && isNarrowWidth(window.innerWidth)) return
if (ctx.get('betterSidebar')?.isTabEnabled('subagent') === false) return
activateTasksPage(ctx, sessionId, { background: true })
activateTasksPage(ctx, store, sessionId, { background: true })
}, [jobsService, jobsSnapshot, sessionId, store, ctx])
/**
@@ -317,7 +342,7 @@ export function useHostFeeds(feeds: {
const pending = subagentJumpRef.current
if (pending === undefined || sessionId !== pending) return
subagentJumpRef.current = undefined
activateTasksPage(ctx, sessionId, { background: false })
activateTasksPage(ctx, store, sessionId, { background: false })
}, [sessionId, store, ctx])
return { subagentJumpRef }
+13 -3
View File
@@ -147,6 +147,8 @@ function LeafView(props: {
renderTab: (tab: SidebarTab, active: boolean, paneId: string) => ReactNode
getTabIcon?: (tab: SidebarTab) => ReactNode
getTabBadge?: (tab: SidebarTab) => ReactNode
/** Unread mark resolver (see TabBar's `isTabUnread`). */
isTabUnread?: (tab: SidebarTab) => boolean
getTabRightActions?: (tab: SidebarTab, paneId: string) => ReactNode
/**
* Reveal a tab's file in the OS file manager (the tab context menu's
@@ -154,7 +156,7 @@ function LeafView(props: {
*/
onRevealInFileManager?: (path: string) => void
}) {
const { leaf, newTabOptions, actions, onNewTab, renderTab, getTabIcon, getTabBadge, getTabRightActions, onRevealInFileManager } = props
const { leaf, newTabOptions, actions, onNewTab, renderTab, getTabIcon, getTabBadge, getTabRightActions, onRevealInFileManager, isTabUnread } = props
const [dropZone, setDropZone] = useState<DropZone | null>(null)
const activeTab = leaf.tabs.find(tab => tab.id === leaf.active) ?? leaf.tabs[leaf.tabs.length - 1]
@@ -210,6 +212,7 @@ function LeafView(props: {
newTabOptions={newTabOptions}
getTabIcon={getTabIcon}
getTabBadge={getTabBadge}
isTabUnread={isTabUnread}
getTabRightActions={getTabRightActions}
onRevealInFileManager={onRevealInFileManager}
onDropTab={(payload, before) => {
@@ -251,10 +254,12 @@ function NodeView(props: {
renderTab: (tab: SidebarTab, active: boolean, paneId: string) => ReactNode
getTabIcon?: (tab: SidebarTab) => ReactNode
getTabBadge?: (tab: SidebarTab) => ReactNode
/** Unread mark resolver (see TabBar's `isTabUnread`). */
isTabUnread?: (tab: SidebarTab) => boolean
getTabRightActions?: (tab: SidebarTab, paneId: string) => ReactNode
onRevealInFileManager?: (path: string) => void
}) {
const { node, state, newTabOptions, actions, onNewTab, renderTab, getTabIcon, getTabBadge, getTabRightActions, onRevealInFileManager } = props
const { node, state, newTabOptions, actions, onNewTab, renderTab, getTabIcon, getTabBadge, getTabRightActions, onRevealInFileManager, isTabUnread } = props
if (node.kind === 'leaf') {
return (
<LeafView
@@ -265,6 +270,7 @@ function NodeView(props: {
renderTab={renderTab}
getTabIcon={getTabIcon}
getTabBadge={getTabBadge}
isTabUnread={isTabUnread}
getTabRightActions={getTabRightActions}
onRevealInFileManager={onRevealInFileManager}
/>
@@ -294,6 +300,7 @@ function NodeView(props: {
renderTab={renderTab}
getTabIcon={getTabIcon}
getTabBadge={getTabBadge}
isTabUnread={isTabUnread}
getTabRightActions={getTabRightActions}
onRevealInFileManager={onRevealInFileManager}
/>
@@ -317,12 +324,14 @@ export function Workbench(props: {
renderTab: (tab: SidebarTab, active: boolean, paneId: string) => ReactNode
getTabIcon?: (tab: SidebarTab) => ReactNode
getTabBadge?: (tab: SidebarTab) => ReactNode
/** Unread mark resolver (see TabBar's `isTabUnread`). */
isTabUnread?: (tab: SidebarTab) => boolean
getTabRightActions?: (tab: SidebarTab, paneId: string) => ReactNode
/** Reveal a tab's file in the OS file manager (see TabBar); absent → the
* tab context menu's reveal row is disabled. */
onRevealInFileManager?: (path: string) => void
}) {
const { state, tree, newTabOptions, actions, onNewTab, renderTab, getTabIcon, getTabBadge, getTabRightActions, onRevealInFileManager } = props
const { state, tree, newTabOptions, actions, onNewTab, renderTab, getTabIcon, getTabBadge, getTabRightActions, onRevealInFileManager, isTabUnread } = props
return (
<div className={css.workbench}>
<NodeView
@@ -334,6 +343,7 @@ export function Workbench(props: {
renderTab={renderTab}
getTabIcon={getTabIcon}
getTabBadge={getTabBadge}
isTabUnread={isTabUnread}
getTabRightActions={getTabRightActions}
onRevealInFileManager={onRevealInFileManager}
/>
+99
View File
@@ -71,6 +71,15 @@ export interface SidebarState {
* unhighlighted.
*/
revealed: string[]
/**
* Tab types whose page the reader has not looked at yet: written when a
* background activation opens its page WITHOUT taking the column over
* (src/client/sidebar/use-host-feeds.ts) and cleared the moment that page
* becomes the one on screen. Deliberately NOT transient — it survives the
* tab body's unmount, a session switch and a reload, because an unread page
* stays unread until it is read.
*/
unread: TabType[]
/** Whether the bottom panel (the plugin's one workbench) is open. */
bottomOpen: boolean
/** The bottom panel's height (clamped to the contract range). */
@@ -148,6 +157,7 @@ export function makeDefaultState(): SidebarState {
nextBrowser: 1,
expanded: [],
revealed: [],
unread: [],
bottomOpen: false,
bottomHeight: BOTTOM_DEFAULT,
bottomSplits: bottomLeaf,
@@ -343,6 +353,26 @@ export function activateTab(state: SidebarState, paneId: string, tabId: string):
}
}
/**
* Mark one tab TYPE as having a page the reader has not looked at yet (the
* dot drawn on its tab). Identity-preserving when it is already marked, so a
* repeat activation does not churn the store (and therefore localStorage).
*/
export function markUnread(state: SidebarState, type: TabType): SidebarState {
return state.unread.includes(type) ? state : { ...state, unread: [...state.unread, type] }
}
/** Clear one tab type's unread mark (the reader just looked at its page). */
export function clearUnread(state: SidebarState, type: TabType): SidebarState {
if (!state.unread.includes(type)) return state
return { ...state, unread: state.unread.filter(entry => entry !== type) }
}
/** Whether one tab type is currently marked unread. */
export function isUnread(state: SidebarState | undefined, type: TabType): boolean {
return state !== undefined && state.unread.includes(type)
}
/** Update the display fields of one open tab (title / path / meta) without
* re-opening it. The browser tab persists its current URL and hostname
* title through this reducer so a reload restores the visited page. A
@@ -679,6 +709,12 @@ export function sanitizeState(parsed: unknown): SidebarState | undefined {
: 1
if (typeof record.activePane !== 'string' && record.activePane !== null) return undefined
if (!Array.isArray(record.expanded) || record.expanded.some(item => typeof item !== 'string')) return undefined
// Unread marks arrived in a later build: like the workbench fields below, a
// missing or malformed value on an OLDER persisted state defaults to "none
// unread" rather than rejecting the whole layout.
const unread = Array.isArray(record.unread)
? (record.unread as unknown[]).filter((item): item is string => typeof item === 'string')
: []
// Pane/split ids must be globally unique (the runtime uid counter is
// shared), so a duplicate id gets a fresh one.
const seen = new Set<string>()
@@ -715,6 +751,9 @@ export function sanitizeState(parsed: unknown): SidebarState | undefined {
nextBrowser,
expanded: record.expanded as string[],
revealed: [],
// Restored, unlike `revealed`: an unread page is still unread after a
// reload, and this list is what draws its dot.
unread: unread,
bottomOpen,
bottomHeight,
bottomSplits,
@@ -913,6 +952,66 @@ export class SidebarStore {
return () => { this.listeners.delete(listener) }
}
/**
* Mark one tab type as unread in the CURRENT session (the dot on its tab).
*
* Reached from the background-activation path alone, so it refuses to
* notify when there is nothing to draw: a repeat mark keeps the state
* reference AND skips the listener fan-out, which is what lets a test (and
* the render path) treat a notification as "the marker really changed".
* Returns whether the marker was set.
*/
markUnread(type: TabType): boolean {
const state = this.snapshot.state
if (state === undefined || state.unread.includes(type)) return false
this.replaceCurrent(markUnread(state, type))
return true
}
/**
* Clear one tab type's unread mark in a NAMED session — the reader switched
* to that page. The current session goes through the publishing path (the
* dot has to disappear from the shell AND from the native chip, both of
* which read the published snapshot); a session that is not on screen takes
* the targeted path, which publishes nothing: its stored state is updated so
* the mark is already gone when the reader switches to it.
*
* `reduceFor` is deliberately not used for the current session: it never
* touches the published snapshot, so reading the mark back (or rendering
* from it) would keep seeing the old value.
*
* A type that is not marked is a strict no-op in both paths — no notify, no
* persist — so a carrier can call this on every visibility change.
* Returns whether a mark was cleared.
*/
clearUnread(type: TabType, sessionId?: string): boolean {
const state = this.snapshot.state
const target = sessionId ?? this.snapshot.sessionId
if (target === undefined) return false
if (target === this.snapshot.sessionId) {
if (state === undefined || !state.unread.includes(type)) return false
this.replaceCurrent(clearUnread(state, type))
return true
}
const stored = this.bySession.get(target)
if (stored === undefined || !stored.unread.includes(type)) return false
this.bySession.set(target, clearUnread(stored, type))
return true
}
/**
* Commit a state this class already minted (identity-checked by the caller)
* as the current session's state, persisting it like any other change.
*/
private replaceCurrent(state: SidebarState): void {
const sessionId = this.snapshot.sessionId
if (sessionId === undefined) return
this.bySession.set(sessionId, state)
this.snapshot = { sessionId, state, prefs: this.prefs }
this.schedulePersist(sessionId, state)
this.notify()
}
getSnapshot(): SidebarSnapshot {
return this.snapshot
}
+4
View File
@@ -119,6 +119,8 @@ service.subscribe(() => {})
const seed: OpenTabSeed = { type: 'my-plugin:db', title: 'DB', path: '/p', id: 'x', meta: { a: 1 } }
service.openTab(seed)
service.openTab(seed, { sessionId: 's1', cwd: '/p' })
// `reveal: false` places the tab without focusing it (a background open).
service.openTab({ ...seed, reveal: false })
const _version: string = service.version
service.features.includes('badge')
const snapshot: SidebarSnapshot | undefined = service.getSnapshot()
@@ -126,6 +128,8 @@ void snapshot
service.subscribeState(() => {})
service.updateTab('tab:1', { title: 'T', path: '/p', meta: 1 })
service.activateTab('tab:1')
// Retiring the "new page" dot for one session's tab type.
service.clearUnread('my-plugin:db', 's1')
service.openFile({ sessionId: 's1', cwd: '/p' }, '/p/a.csv', 'Data')
/** File-icon registration surface (feature `fileIcons`). */
+200
View File
@@ -0,0 +1,200 @@
// @vitest-environment jsdom
/**
* The unread dot on DSH's OWN tab chip (`NativeTabTitle`) — the second of the
* two surfaces the mark is drawn on, and the only one the plugin does not
* render a strip for: a chip's content IS the plugin's registration in the
* host's `sidebar.right.pane.tab.title` slot, so this component is the whole
* carrier.
*
* The two halves pinned here are the ones the bottom workbench cannot answer:
*
* - a marked tab type draws the dot on its chip (and an unmarked one does not);
* - the chip RETIRES the mark by itself. Clicking a chip is a host interaction
* this plugin never sees — `ISidebarRight` exposes a plain `active()` reader
* and no selection feed — so the host's own `tab.visible` flag is the only
* signal that the reader is looking at this page now. That is also why the
* clearing must not fire for an INACTIVE chip: the host draws the title of
* every expanded tab, so a `!visible` chip that cleared on render would
* erase the dot the moment it was raised.
*/
import { afterEach, describe, expect, it } from 'vitest'
import { createElement } from 'react'
import { createRoot, type Root } from 'react-dom/client'
import { act } from 'react-dom/test-utils'
import { setupReactAct } from './test-utils.ts'
setupReactAct()
import {
NativeTabTitle,
createNativeTabRecords,
type NativeTabInfo,
} from '../src/client/native/tab-adapter.tsx'
import { createBetterSidebarService, type BetterSidebarService } from '../src/client/service.ts'
import { createSidebarStore, type SidebarStore } from '../src/client/state.ts'
import { t } from '../src/client/locales.ts'
const SESSION = 's1'
/** One native tab record, as the host hands it to a title registration. */
function nativeInfo(visible: boolean): NativeTabInfo {
return {
tab: {
id: 't1',
kind: 'subagent',
title: 'Tasks',
contentId: 'sidebar://subagent',
visible,
navigation: { address: 'sidebar://subagent', params: undefined, revision: 0 },
signal: new AbortController().signal,
},
}
}
function createService(store: SidebarStore): BetterSidebarService {
const service = createBetterSidebarService(store)
service.registerTab({
id: 'subagent',
title: () => 'Tasks',
// The chip's glyph is the descriptor's, like every other plugin tab type.
icon: (size: number) => createElement('i', { 'data-type-icon': size }),
component: () => createElement('div'),
})
return service
}
/** The unread dots currently drawn in a chip's host element. */
function dots(host: HTMLElement): Element[] {
return [...host.querySelectorAll(`[aria-label="${t('tabUnread')}"]`)]
}
const mounted: Array<{ host: HTMLDivElement; root: Root }> = []
/**
* Render one chip and hand back its host. `info` is re-read on every render
* (the returned closure keeps whatever object the caller last stored), which
* is how a visibility change is delivered — exactly like the host's own
* `useTabInfo` re-delivering its snapshot.
*/
function renderChip(options: {
store: SidebarStore
service: BetterSidebarService
initialVisible: boolean
}): { host: HTMLDivElement; rerender: (visible: boolean) => void } {
const { store, service } = options
const records = createNativeTabRecords()
records.attachStore(store)
let info = nativeInfo(options.initialVisible)
const host = document.createElement('div')
document.body.append(host)
const root = createRoot(host)
const draw = (): void => {
act(() => {
root.render(createElement(NativeTabTitle, {
records,
service,
descriptorId: 'subagent',
sessionId: SESSION,
useTabInfo: () => info,
} as never))
})
}
draw()
mounted.push({ host, root })
return {
host,
rerender: (visible: boolean) => {
info = nativeInfo(visible)
draw()
},
}
}
function makeStore(): SidebarStore {
const store = createSidebarStore()
store.setSession(SESSION)
return store
}
afterEach(() => {
while (mounted.length > 0) {
const entry = mounted.pop()!
act(() => { entry.root.unmount() })
entry.host.remove()
}
document.body.innerHTML = ''
})
describe('native tab chip: the unread dot', () => {
it('draws the dot on a marked tab type and nothing on an unmarked one', () => {
const store = makeStore()
const service = createService(store)
const marked = renderChip({ store, service, initialVisible: false })
// The chip is drawn BEFORE the mark arrives — the host draws the titles of
// every expanded tab, and the page this one announces may not even be open
// yet.
expect(dots(marked.host)).toHaveLength(0)
act(() => { store.markUnread('subagent') })
const drawn = dots(marked.host)
expect(drawn).toHaveLength(1)
// The dot is labelled, not decorative: the glyph beside it is the part
// that is `aria-hidden`.
expect(drawn[0]!.getAttribute('title')).toBe(t('tabUnread'))
})
it('retires the mark once the host says this tab is the visible one', () => {
const store = makeStore()
const service = createService(store)
act(() => { store.markUnread('subagent') })
const chip = renderChip({ store, service, initialVisible: false })
// Still marked while the reader is elsewhere: an inactive chip is drawn by
// the host too, so it must not clear what it did not earn.
expect(dots(chip.host)).toHaveLength(1)
expect(store.getSnapshot().state!.unread).toEqual(['subagent'])
chip.rerender(true)
expect(store.getSnapshot().state!.unread).toEqual([])
expect(dots(chip.host)).toHaveLength(0)
})
it('a chip that is never visible never clears the mark', () => {
const store = makeStore()
const service = createService(store)
act(() => { store.markUnread('subagent') })
const chip = renderChip({ store, service, initialVisible: false })
chip.rerender(false)
chip.rerender(false)
expect(store.getSnapshot().state!.unread).toEqual(['subagent'])
expect(dots(chip.host)).toHaveLength(1)
})
it('an unread type of ANOTHER tab does not mark this chip', () => {
// The mark is per tab TYPE: the chip must read its own, not "any mark".
const store = makeStore()
const service = createService(store)
act(() => { store.markUnread('editor') })
const chip = renderChip({ store, service, initialVisible: false })
expect(dots(chip.host)).toHaveLength(0)
})
it('adds the dot WITHOUT touching the glyph or the title', () => {
// A guard on the shape this change could have broken: the glyph stays
// decorative (its wrapper is `aria-hidden`, so the chip's accessible name
// is still the title) and the dot is a sibling added after the title
// rather than something that replaces either.
const store = makeStore()
const service = createService(store)
act(() => { store.markUnread('subagent') })
const chip = renderChip({ store, service, initialVisible: false })
const glyphIcon = chip.host.querySelector('[data-type-icon]')
expect(glyphIcon).not.toBeNull()
expect(glyphIcon!.closest('[aria-hidden="true"]')).not.toBeNull()
expect(chip.host.textContent).toBe('Tasks')
const drawn = dots(chip.host)
expect(drawn).toHaveLength(1)
// The dot is empty by design: its meaning is the label, and an empty
// `role="img"` without one would be announced as nothing at all.
expect(drawn[0]!.textContent).toBe('')
})
})
+82 -3
View File
@@ -30,7 +30,8 @@ import { setupReactAct } from './test-utils.ts'
setupReactAct()
import { Sidebar } from '../src/client/Sidebar.tsx'
import { allLeaves, createSidebarStore, type SidebarStore } from '../src/client/state.ts'
import { allLeaves, createSidebarStore, type SidebarStore, type SidebarTab } from '../src/client/state.ts'
import { t } from '../src/client/locales.ts'
import {
createBetterSidebarService,
type BetterSidebarService,
@@ -188,6 +189,8 @@ interface MountedSidebar {
sessionId: string
/** The client jobs feed the auto-open trigger watches (push rosters). */
jobs: JobsFeed
/** The shell's own DOM: the bottom workbench strip renders inside it. */
container: HTMLDivElement
unmount: () => void
}
@@ -299,6 +302,7 @@ function mountSidebar(
column,
sessionId,
jobs,
container,
unmount: () => {
act(() => { root.unmount() })
container.remove()
@@ -405,6 +409,23 @@ function expectNativeTasksOpen(sidebar: MountedSidebar, sessionId: string): void
}])
}
/**
* The unread dot, wherever it is drawn. The native chip lives in the HOST's
* tree (the plugin only contributes the `sidebar.right.pane.tab.title`
* content), so inside this shell the readable carrier is the bottom
* workbench's own strip; `tests/native-tab-unread.spec.tsx` renders the chip
* itself and pins that side.
*/
function unreadDots(sidebar: MountedSidebar): Element[] {
return [...sidebar.container.querySelectorAll(`[aria-label="${t('tabUnread')}"]`)]
}
/** The workbench tab holding one type, or undefined when it is not open there. */
function workbenchTab(sidebar: MountedSidebar, type: string): SidebarTab | undefined {
return allLeaves(sidebar.store.getSnapshot().state!.bottomSplits)
.flatMap(leaf => leaf.tabs).find(tab => tab.type === type)
}
/** The plugin's own bottom workbench kept its own state and gained no tab. */
function expectWorkbenchUntouched(sidebar: MountedSidebar, open = false): void {
const state = sidebar.store.getSnapshot().state!
@@ -472,12 +493,70 @@ describe('Sidebar background-activity auto-activation (#162)', () => {
// view, which is exactly what must not happen.
const sidebar = mountSidebar(1024, false, { columnExpanded: true, activeKind: 'editor' })
await publishActivity(sidebar, source)
expect(sidebar.surface.opens).toEqual([])
// No open, and no park either: the column stays as the reader left it.
// The page is still CREATED — the event is never dropped — but without
// the focus op (`revealIfOpened: false` is exactly the host's "place it,
// do not focus it"): that pair is what the takeover gate used to buy by
// returning early, at the price of losing the page.
expect(sidebar.surface.opens).toEqual([{
sessionId: sidebar.sessionId,
kind: 'subagent',
params: expect.objectContaining({ title: expect.any(String) }),
revealIfOpened: false,
}])
// No park either: the column stays as the reader left it.
expect(sidebar.column.toggles).toBe(0)
// …and the page is announced instead of silently created. (The two
// CARRIERS of that announcement are pinned by the lanes below and by
// tests/native-tab-unread.spec.tsx; this lane is the mark itself.)
expect(sidebar.store.getSnapshot().state!.unread).toEqual(['subagent'])
},
)
it('a gated activation marks the page unread on the bottom strip, and activating it clears the mark', async () => {
// Both carriers read the same per-session mark, so the workbench strip is
// where this shell can see it: the Tasks page is open there and the reader
// is looking at a document in the native column instead.
const sidebar = mountSidebar(1024, true, { columnExpanded: true, activeKind: 'editor' })
act(() => {
sidebar.service.openTab(
{ type: 'subagent', title: 'Tasks', target: 'bottom' },
{ sessionId: sidebar.sessionId },
)
})
const tab = workbenchTab(sidebar, 'subagent')
expect(tab).toBeDefined()
expect(unreadDots(sidebar)).toHaveLength(0)
await publishActivity(sidebar, 'subagent')
expect(sidebar.store.getSnapshot().state!.unread).toEqual(['subagent'])
const dots = unreadDots(sidebar)
expect(dots).toHaveLength(1)
// Reached through the workbench its own activation path: the click IS the
// reader looking at the page.
act(() => { sidebar.service.activateTab(tab!.id, { sessionId: sidebar.sessionId }) })
sidebar.store.reduceFor(sidebar.sessionId, st => ({ ...st, unread: [] }))
expect(sidebar.store.getSnapshot().state!.unread).toEqual([])
expect(unreadDots(sidebar)).toHaveLength(0)
})
it('a column the reader is ALREADY on the Tasks page of raises no dot', async () => {
// The mark means "there is a page you have not looked at"; the re-focus
// path below is the reader already looking at it.
const sidebar = mountSidebar(1024, false, { columnExpanded: true, activeKind: 'subagent' })
await publishActivity(sidebar, 'subagent')
expect(sidebar.store.getSnapshot().state!.unread).toEqual([])
expect(unreadDots(sidebar)).toHaveLength(0)
})
it('a normal (revealed) activation raises no dot', async () => {
// Only the gated open is unread: an activation that really takes the
// column over has shown the reader the page already.
const sidebar = mountSidebar(1024, false, { columnExpanded: false, activeKind: 'editor' })
await publishActivity(sidebar, 'subagent')
expectNativeTasksOpen(sidebar, sidebar.sessionId)
expect(sidebar.store.getSnapshot().state!.unread).toEqual([])
})
it('a WIDE column already showing the Tasks page is still re-focused in place', async () => {
const sidebar = mountSidebar(1024, false, { columnExpanded: true, activeKind: 'subagent' })
await publishActivity(sidebar, 'subagent')
+1
View File
@@ -188,6 +188,7 @@ describe('Workbench right-actions forwarding', () => {
nextBrowser: 1,
expanded: [],
revealed: [],
unread: [],
bottomOpen: true,
bottomHeight: 220,
bottomSplits: nestedSplitTree(),