🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🐛 fix(task-slug): keep combining marks and fall back to the instruction (#19519)
Rdmclin2515f3b846185
diff --git a/apps/server/src/routers/lambda/recent.ts b/apps/server/src/routers/lambda/recent.tsindex deef9385659..742d0f42fbf 100644--- a/apps/server/src/routers/lambda/recent.ts+++ b/apps/server/src/routers/lambda/recent.ts@@ -80,6 +80,7 @@ export const recentRouter = router({lastAssistantMessage: item.lastAssistantMessage,metadata: item.metadata as ChatTopicMetadata | undefined,routePath,+ slugTitle: item.slugTitle,status: item.status,title: item.title,type: item.type,diff --git a/locales/ar/setting.json b/locales/ar/setting.jsonindex a36fc52d0a1..adca6988b64 100644--- a/locales/ar/setting.json+++ b/locales/ar/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} مقعد · معاينة الفوترة {{interval}}","workspace.billingPage.billing.change.purchasedSeats": "مقاعد إضافية مدفوعة مسبقًا","workspace.billingPage.billing.change.purchasedSeatsWithMax": "المقاعد المدفوعة مسبقًا (بحد أقصى {{max}} مقعد)",+ "workspace.billingPage.billing.change.seatFloorPending": "يحتوي مساحة العمل هذه على {{members}} أعضاء قابلين للفوترة و{{pending}} دعوات معلقة، باستخدام {{used}} مقاعد. قم بإلغاء دعوة معلقة قبل تقليل المقاعد أكثر.","workspace.billingPage.billing.change.seatReductionHint": "تخفيض المقاعد يتم تطبيقه في دورة الفوترة التالية. الدورة الحالية غير مستردة.","workspace.billingPage.billing.change.title": "تعديل الخطة","workspace.billingPage.billing.changeFailed": "فشل في تحديث الاشتراك.",diff --git a/locales/bg-BG/setting.json b/locales/bg-BG/setting.jsonindex 1cab6747266..d1e1e88fe02 100644--- a/locales/bg-BG/setting.json+++ b/locales/bg-BG/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} места · предварителен преглед на {{interval}} фактуриране","workspace.billingPage.billing.change.purchasedSeats": "Предплатени допълнителни места","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Предплатени места (макс. {{max}} места)",+ "workspace.billingPage.billing.change.seatFloorPending": "Това работно пространство има {{members}} платени членове и {{pending}} чакащи покани, използвайки {{used}} места. Отменете чакаща покана, преди да намалите местата допълнително.","workspace.billingPage.billing.change.seatReductionHint": "Намаляването на местата влиза в сила в следващия цикъл на фактуриране. Текущият цикъл не се възстановява.","workspace.billingPage.billing.change.title": "Коригиране на плана","workspace.billingPage.billing.changeFailed": "Неуспешно актуализиране на абонамента.",diff --git a/locales/de-DE/setting.json b/locales/de-DE/setting.jsonindex 3a0a7243374..9dca85498dc 100644--- a/locales/de-DE/setting.json+++ b/locales/de-DE/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} Plätze · Vorschau für {{interval}} Abrechnung","workspace.billingPage.billing.change.purchasedSeats": "Vorausbezahlte zusätzliche Plätze","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Vorausbezahlte Plätze (max. {{max}} Plätze)",+ "workspace.billingPage.billing.change.seatFloorPending": "Dieser Arbeitsbereich hat {{members}} abrechenbare Mitglieder und {{pending}} ausstehende Einladungen, wobei {{used}} Plätze genutzt werden. Widerrufen Sie eine ausstehende Einladung, bevor Sie die Plätze weiter reduzieren.","workspace.billingPage.billing.change.seatReductionHint": "Die Reduzierung der Plätze tritt im nächsten Abrechnungszyklus in Kraft. Der aktuelle Zyklus wird nicht erstattet.","workspace.billingPage.billing.change.title": "Plan anpassen","workspace.billingPage.billing.changeFailed": "Abonnement konnte nicht aktualisiert werden.",diff --git a/locales/en-US/setting.json b/locales/en-US/setting.jsonindex a04634299cb..57e9e43db97 100644--- a/locales/en-US/setting.json+++ b/locales/en-US/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} seats · {{interval}} billing preview","workspace.billingPage.billing.change.purchasedSeats": "Prepaid extra seats","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Prepaid seats (max {{max}} seats)",+ "workspace.billingPage.billing.change.seatFloorPending": "This workspace has {{members}} billable members and {{pending}} pending invites, using {{used}} seats. Revoke a pending invite before reducing seats further.","workspace.billingPage.billing.change.seatReductionHint": "Reducing seats takes effect on the next billing cycle. The current cycle is not refunded.","workspace.billingPage.billing.change.title": "Adjust plan","workspace.billingPage.billing.changeFailed": "Failed to update subscription.",diff --git a/locales/es-ES/setting.json b/locales/es-ES/setting.jsonindex da41d43b531..406410da24b 100644--- a/locales/es-ES/setting.json+++ b/locales/es-ES/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} asientos · vista previa de facturación {{interval}}","workspace.billingPage.billing.change.purchasedSeats": "Asientos adicionales prepagados","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Asientos prepagados (máximo {{max}} asientos)",+ "workspace.billingPage.billing.change.seatFloorPending": "Este espacio de trabajo tiene {{members}} miembros facturables y {{pending}} invitaciones pendientes, utilizando {{used}} asientos. Revoque una invitación pendiente antes de reducir más asientos.","workspace.billingPage.billing.change.seatReductionHint": "La reducción de asientos entra en vigor en el próximo ciclo de facturación. El ciclo actual no es reembolsable.","workspace.billingPage.billing.change.title": "Ajustar plan","workspace.billingPage.billing.changeFailed": "Error al actualizar la suscripción.",diff --git a/locales/fa-IR/setting.json b/locales/fa-IR/setting.jsonindex 3ba4ee32f73..96057cf445f 100644--- a/locales/fa-IR/setting.json+++ b/locales/fa-IR/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} نفر · پیشنمایش صورتحساب {{interval}}","workspace.billingPage.billing.change.purchasedSeats": "صندلیهای اضافی پیشپرداخت شده","workspace.billingPage.billing.change.purchasedSeatsWithMax": "صندلیهای پیشپرداخت شده (حداکثر {{max}} صندلی)",+ "workspace.billingPage.billing.change.seatFloorPending": "این فضای کاری دارای {{members}} عضو قابل پرداخت و {{pending}} دعوتنامه در انتظار است که از {{used}} صندلی استفاده میکنند. قبل از کاهش بیشتر صندلیها، یک دعوتنامه در انتظار را لغو کنید.","workspace.billingPage.billing.change.seatReductionHint": "کاهش تعداد صندلیها در چرخه صورتحساب بعدی اعمال میشود. چرخه فعلی بازپرداخت نمیشود.","workspace.billingPage.billing.change.title": "تنظیم طرح","workspace.billingPage.billing.changeFailed": "بهروزرسانی اشتراک ناموفق بود.",diff --git a/locales/fr-FR/setting.json b/locales/fr-FR/setting.jsonindex 9197660f44a..68f8ec14b81 100644--- a/locales/fr-FR/setting.json+++ b/locales/fr-FR/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} places · aperçu de la facturation {{interval}}","workspace.billingPage.billing.change.purchasedSeats": "Places supplémentaires prépayées","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Sièges prépayés (max {{max}} sièges)",+ "workspace.billingPage.billing.change.seatFloorPending": "Cet espace de travail compte {{members}} membres facturables et {{pending}} invitations en attente, utilisant {{used}} places. Révoquez une invitation en attente avant de réduire davantage les places.","workspace.billingPage.billing.change.seatReductionHint": "La réduction des sièges prend effet au prochain cycle de facturation. Le cycle actuel n'est pas remboursé.","workspace.billingPage.billing.change.title": "Ajuster le plan","workspace.billingPage.billing.changeFailed": "Échec de la mise à jour de l'abonnement.",diff --git a/locales/it-IT/setting.json b/locales/it-IT/setting.jsonindex 24fa60eb42c..451985a6ae5 100644--- a/locales/it-IT/setting.json+++ b/locales/it-IT/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} posti · anteprima fatturazione {{interval}}","workspace.billingPage.billing.change.purchasedSeats": "Posti extra prepagati","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Posti prepagati (massimo {{max}} posti)",+ "workspace.billingPage.billing.change.seatFloorPending": "Questo spazio di lavoro ha {{members}} membri fatturabili e {{pending}} inviti in sospeso, utilizzando {{used}} posti. Revoca un invito in sospeso prima di ridurre ulteriormente i posti.","workspace.billingPage.billing.change.seatReductionHint": "La riduzione dei posti avrà effetto nel prossimo ciclo di fatturazione. Il ciclo corrente non è rimborsabile.","workspace.billingPage.billing.change.title": "Modifica piano","workspace.billingPage.billing.changeFailed": "Aggiornamento dell'abbonamento non riuscito.",diff --git a/locales/ja-JP/setting.json b/locales/ja-JP/setting.jsonindex 9d4791a64a0..64edf4066a9 100644--- a/locales/ja-JP/setting.json+++ b/locales/ja-JP/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}}席 · {{interval}}請求プレビュー","workspace.billingPage.billing.change.purchasedSeats": "事前購入された追加席","workspace.billingPage.billing.change.purchasedSeatsWithMax": "事前購入済みの座席(最大{{max}}席)",+ "workspace.billingPage.billing.change.seatFloorPending": "このワークスペースには{{members}}人の課金対象メンバーと{{pending}}件の保留中の招待があり、{{used}}席が使用されています。さらに席数を減らす前に、保留中の招待を取り消してください。","workspace.billingPage.billing.change.seatReductionHint": "座席数の削減は次の請求サイクルで有効になります。現在のサイクルでは返金されません。","workspace.billingPage.billing.change.title": "プランを調整","workspace.billingPage.billing.changeFailed": "サブスクリプションの更新に失敗しました。",diff --git a/locales/ko-KR/setting.json b/locales/ko-KR/setting.jsonindex 2a644e6819b..5c0afb6e252 100644--- a/locales/ko-KR/setting.json+++ b/locales/ko-KR/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}}석 · {{interval}} 청구 미리보기","workspace.billingPage.billing.change.purchasedSeats": "추가로 선결제한 좌석","workspace.billingPage.billing.change.purchasedSeatsWithMax": "선결제 좌석 (최대 {{max}}석)",+ "workspace.billingPage.billing.change.seatFloorPending": "이 작업 공간에는 {{members}}명의 청구 가능한 멤버와 {{pending}}개의 보류 중인 초대가 있으며, {{used}}개의 좌석을 사용 중입니다. 좌석을 더 줄이기 전에 보류 중인 초대를 취소하세요.","workspace.billingPage.billing.change.seatReductionHint": "좌석 수 감소는 다음 청구 주기에 적용됩니다. 현재 주기는 환불되지 않습니다.","workspace.billingPage.billing.change.title": "플랜 조정","workspace.billingPage.billing.changeFailed": "구독 업데이트에 실패했습니다.",diff --git a/locales/nl-NL/setting.json b/locales/nl-NL/setting.jsonindex 8de8f5eb8e3..1519c5553f3 100644--- a/locales/nl-NL/setting.json+++ b/locales/nl-NL/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} plaatsen · {{interval}} factureringsvoorbeeld","workspace.billingPage.billing.change.purchasedSeats": "Vooraf betaalde extra plaatsen","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Vooraf betaalde plaatsen (maximaal {{max}} plaatsen)",+ "workspace.billingPage.billing.change.seatFloorPending": "Deze werkruimte heeft {{members}} factureerbare leden en {{pending}} openstaande uitnodigingen, met {{used}} gebruikte stoelen. Trek een openstaande uitnodiging in voordat u het aantal stoelen verder verlaagt.","workspace.billingPage.billing.change.seatReductionHint": "Het verminderen van plaatsen wordt van kracht in de volgende factureringscyclus. De huidige cyclus wordt niet terugbetaald.","workspace.billingPage.billing.change.title": "Plan aanpassen","workspace.billingPage.billing.changeFailed": "Abonnement bijwerken mislukt.",diff --git a/locales/pl-PL/setting.json b/locales/pl-PL/setting.jsonindex d3bd76df13b..d1111bb9e2a 100644--- a/locales/pl-PL/setting.json+++ b/locales/pl-PL/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} miejsc · podgląd rozliczenia {{interval}}","workspace.billingPage.billing.change.purchasedSeats": "Dodatkowe opłacone miejsca","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Opłacone miejsca (maks. {{max}} miejsc)",+ "workspace.billingPage.billing.change.seatFloorPending": "Ten obszar roboczy ma {{members}} członków objętych opłatą i {{pending}} oczekujących zaproszeń, wykorzystując {{used}} miejsc. Cofnij oczekujące zaproszenie przed dalszym zmniejszeniem liczby miejsc.","workspace.billingPage.billing.change.seatReductionHint": "Zmniejszenie liczby miejsc zacznie obowiązywać w następnym cyklu rozliczeniowym. Obecny cykl nie podlega zwrotowi.","workspace.billingPage.billing.change.title": "Dostosuj plan","workspace.billingPage.billing.changeFailed": "Nie udało się zaktualizować subskrypcji.",diff --git a/locales/pt-BR/setting.json b/locales/pt-BR/setting.jsonindex f179c391fde..3cec4c4a28d 100644--- a/locales/pt-BR/setting.json+++ b/locales/pt-BR/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} assentos · prévia de cobrança {{interval}}","workspace.billingPage.billing.change.purchasedSeats": "Assentos extras pré-pagos","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Assentos pré-pagos (máx. {{max}} assentos)",+ "workspace.billingPage.billing.change.seatFloorPending": "Este espaço de trabalho tem {{members}} membros faturáveis e {{pending}} convites pendentes, utilizando {{used}} assentos. Revogue um convite pendente antes de reduzir ainda mais os assentos.","workspace.billingPage.billing.change.seatReductionHint": "A redução de assentos entra em vigor no próximo ciclo de cobrança. O ciclo atual não é reembolsado.","workspace.billingPage.billing.change.title": "Ajustar plano","workspace.billingPage.billing.changeFailed": "Falha ao atualizar a assinatura.",diff --git a/locales/ru-RU/setting.json b/locales/ru-RU/setting.jsonindex 48862e84fbe..778c026c898 100644--- a/locales/ru-RU/setting.json+++ b/locales/ru-RU/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} мест · предварительный расчет {{interval}}","workspace.billingPage.billing.change.purchasedSeats": "Дополнительно оплаченные места","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Предоплаченные места (максимум {{max}} мест)",+ "workspace.billingPage.billing.change.seatFloorPending": "В этом рабочем пространстве {{members}} оплачиваемых участников и {{pending}} ожидающих приглашений, используется {{used}} мест. Отмените ожидающее приглашение, прежде чем уменьшать количество мест дальше.","workspace.billingPage.billing.change.seatReductionHint": "Уменьшение количества мест вступает в силу в следующем платежном цикле. Текущий цикл не возмещается.","workspace.billingPage.billing.change.title": "Настроить план","workspace.billingPage.billing.changeFailed": "Не удалось обновить подписку.",diff --git a/locales/tr-TR/setting.json b/locales/tr-TR/setting.jsonindex 33306c33e21..0c0e6971544 100644--- a/locales/tr-TR/setting.json+++ b/locales/tr-TR/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} koltuk · {{interval}} faturalama önizlemesi","workspace.billingPage.billing.change.purchasedSeats": "Ön ödemeli ek koltuklar","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Ön ödemeli koltuklar (maksimum {{max}} koltuk)",+ "workspace.billingPage.billing.change.seatFloorPending": "Bu çalışma alanında {{members}} faturalandırılabilir üye ve {{pending}} bekleyen davet var, {{used}} koltuk kullanılıyor. Daha fazla koltuk azaltmadan önce bekleyen bir daveti iptal edin.","workspace.billingPage.billing.change.seatReductionHint": "Koltuk azaltma, bir sonraki fatura döneminde geçerli olur. Mevcut dönem için geri ödeme yapılmaz.","workspace.billingPage.billing.change.title": "Planı ayarla","workspace.billingPage.billing.changeFailed": "Abonelik güncellenemedi.",diff --git a/locales/vi-VN/setting.json b/locales/vi-VN/setting.jsonindex 6e2e7490288..cd0bc258a09 100644--- a/locales/vi-VN/setting.json+++ b/locales/vi-VN/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} chỗ ngồi · Xem trước thanh toán {{interval}}","workspace.billingPage.billing.change.purchasedSeats": "Chỗ ngồi trả trước bổ sung","workspace.billingPage.billing.change.purchasedSeatsWithMax": "Chỗ ngồi đã trả trước (tối đa {{max}} chỗ ngồi)",+ "workspace.billingPage.billing.change.seatFloorPending": "Không gian làm việc này có {{members}} thành viên tính phí và {{pending}} lời mời đang chờ, sử dụng {{used}} chỗ ngồi. Hủy một lời mời đang chờ trước khi giảm thêm chỗ ngồi.","workspace.billingPage.billing.change.seatReductionHint": "Việc giảm số lượng chỗ ngồi sẽ có hiệu lực trong chu kỳ thanh toán tiếp theo. Chu kỳ hiện tại sẽ không được hoàn tiền.","workspace.billingPage.billing.change.title": "Điều chỉnh gói","workspace.billingPage.billing.changeFailed": "Cập nhật đăng ký thất bại.",diff --git a/locales/zh-CN/setting.json b/locales/zh-CN/setting.jsonindex 8cb5ea78cfb..25aa8aced7b 100644--- a/locales/zh-CN/setting.json+++ b/locales/zh-CN/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} 个席位 · {{interval}} 计费预览","workspace.billingPage.billing.change.purchasedSeats": "预购额外席位","workspace.billingPage.billing.change.purchasedSeatsWithMax": "预购席位(最多 {{max}} 个席位)",+ "workspace.billingPage.billing.change.seatFloorPending": "当前工作区有 {{members}} 名计费成员和 {{pending}} 位邀请中的成员,共占用 {{used}} 个席位。如需继续减少席位,请先撤销邀请中的成员。","workspace.billingPage.billing.change.seatReductionHint": "减少席位将在下个计费周期生效,当前周期不会退款。","workspace.billingPage.billing.change.title": "调整计划","workspace.billingPage.billing.changeFailed": "更新订阅失败。",diff --git a/locales/zh-TW/setting.json b/locales/zh-TW/setting.jsonindex f2c9ee1b64f..34bc75f8db5 100644--- a/locales/zh-TW/setting.json+++ b/locales/zh-TW/setting.json@@ -2026,6 +2026,7 @@"workspace.billingPage.billing.change.preview": "{{seats}} 個席位 · {{interval}} 計費預覽","workspace.billingPage.billing.change.purchasedSeats": "預付額外席位","workspace.billingPage.billing.change.purchasedSeatsWithMax": "預付座位(最多 {{max}} 個座位)",+ "workspace.billingPage.billing.change.seatFloorPending": "此工作區有 {{members}} 位需付費的成員和 {{pending}} 個待處理的邀請,使用了 {{used}} 個席位。在進一步減少席位之前,請撤銷一個待處理的邀請。","workspace.billingPage.billing.change.seatReductionHint": "減少座位數將在下一個計費週期生效。當前週期不予退款。","workspace.billingPage.billing.change.title": "調整方案","workspace.billingPage.billing.changeFailed": "更新訂閱失敗。",diff --git a/packages/database/src/models/__tests__/recent.test.ts b/packages/database/src/models/__tests__/recent.test.tsindex 50bca51a90c..99008cb1225 100644--- a/packages/database/src/models/__tests__/recent.test.ts+++ b/packages/database/src/models/__tests__/recent.test.ts@@ -526,6 +526,13 @@ describe('RecentModel', () => {const byId = Object.fromEntries(result.map((r) => [r.id, r.title]));expect(byId['task-named']).toBe('Named');expect(byId['task-instruction']).toBe('fallback to instruction');++ // `slugTitle` deliberately does NOT take that fallback: it feeds the+ // task link, and a prompt body in the path would reach browser history,+ // analytics page views and every copied link.+ const slugById = Object.fromEntries(result.map((r) => [r.id, r.slugTitle]));+ expect(slugById['task-named']).toBe('Named');+ expect(slugById['task-instruction']).toBeNull();});});diff --git a/packages/database/src/models/recent.ts b/packages/database/src/models/recent.tsindex d8745676320..15b5f3b8d72 100644--- a/packages/database/src/models/recent.ts+++ b/packages/database/src/models/recent.ts@@ -23,6 +23,13 @@ export interface RecentDbItem {metadata?: any;routeGroupId: string | null;routeId: string | null;+ /**+ * Slug source for a task link — the deliberate `tasks.name`, never the+ * instruction. `title` coalesces the two for display, but a prompt body must+ * not reach a URL, where it would land in history, analytics page views,+ * access logs and anything pasted from the clipboard.+ */+ slugTitle?: string | null;/** Task lifecycle status when `type === 'task'`; null for topic/document. */status: TaskStatus | null;title: string;@@ -114,6 +121,7 @@ export class RecentModel {metadata: sql<any>`${topics.metadata}`.as('metadata'),routeGroupId: sql<string | null>`${topics.groupId}`.as('route_group_id'),routeId: sql<string | null>`${topics.agentId}`.as('route_id'),+ slugTitle: sql<string | null>`NULL`.as('slug_title'),status: sql<TaskStatus | null>`NULL`.as('status'),title: sql<string>`COALESCE(${topics.title}, 'Untitled Topic')`.as('title'),type: sql<RecentDbItem['type']>`'topic'`.as('type'),@@ -160,6 +168,7 @@ export class RecentModel {metadata: sql<any>`NULL`.as('metadata'),routeGroupId: sql<string | null>`NULL`.as('route_group_id'),routeId: sql<string | null>`NULL`.as('route_id'),+ slugTitle: sql<string | null>`NULL`.as('slug_title'),status: sql<TaskStatus | null>`NULL`.as('status'),title:sql<string>`COALESCE(${documents.title}, ${documents.filename}, 'Untitled Document')`.as(@@ -189,6 +198,10 @@ export class RecentModel {metadata: sql<any>`NULL`.as('metadata'),routeGroupId: sql<string | null>`NULL`.as('route_group_id'),routeId: sql<string | null>`${tasks.assigneeAgentId}`.as('route_id'),+ // Display title falls back to the instruction so a nameless task still+ // reads as something; `slugTitle` deliberately does not, so the link+ // this row builds carries only what the task was actually named.+ slugTitle: sql<string | null>`${tasks.name}`.as('slug_title'),status: sql<TaskStatus | null>`${tasks.status}`.as('status'),title: sql<string>`COALESCE(${tasks.name}, ${tasks.instruction}, 'Untitled Task')`.as('title',@@ -229,6 +242,7 @@ export class RecentModel {metadata: row.metadata ?? undefined,routeGroupId: row.routeGroupId,routeId: row.routeId,+ slugTitle: row.slugTitle,status: row.status,title: row.title,type: row.type,diff --git a/packages/locales/src/default/setting.ts b/packages/locales/src/default/setting.tsindex 73df8e3e1fb..d6267224a70 100644--- a/packages/locales/src/default/setting.ts+++ b/packages/locales/src/default/setting.ts@@ -1896,6 +1896,8 @@ When I am ___, I need ___'One-time upgrades require a higher tier or a longer duration.','workspace.billingPage.billing.change.memberLimitReached':'This workspace currently has {{count}} billable members. Remove members or change them to {{viewerRole}} before reducing seats further.',+ 'workspace.billingPage.billing.change.seatFloorPending':+ 'This workspace has {{members}} billable members and {{pending}} pending invites, using {{used}} seats. Revoke a pending invite before reducing seats further.','workspace.billingPage.billing.change.seatReductionHint':'Reducing seats takes effect on the next billing cycle. The current cycle is not refunded.','workspace.billingPage.billing.change.title': 'Adjust plan',diff --git a/packages/types/src/recent.ts b/packages/types/src/recent.tsindex 30cc6fb456f..63fd09d7a84 100644--- a/packages/types/src/recent.ts+++ b/packages/types/src/recent.ts@@ -9,6 +9,11 @@ export interface RecentItem {lastAssistantMessage?: string | null;metadata?: ChatTopicMetadata;routePath: string;+ /**+ * Slug source for a task link — `tasks.name` only. `title` may fall back to+ * the instruction for display; a prompt body must never reach a URL.+ */+ slugTitle?: string | null;/** Task lifecycle status when `type === 'task'`; null for topic/document. */status: TaskStatus | null;title: string;diff --git a/packages/utils/src/taskSlug.test.ts b/packages/utils/src/taskSlug.test.tsindex 5914a9dee22..48abc1dc240 100644--- a/packages/utils/src/taskSlug.test.ts+++ b/packages/utils/src/taskSlug.test.ts@@ -2,6 +2,11 @@ import { describe, expect, it } from 'vitest';import { TASK_SLUG_MAX_LENGTH, taskTitleSlug } from './taskSlug';+const toGraphemes = (value: string) =>+ [...new Intl.Segmenter(undefined, { granularity: 'grapheme' }).segment(value)].map(+ (entry) => entry.segment,+ );+describe('taskTitleSlug', () => {it('lowercases and joins words with a single dash', () => {expect(taskTitleSlug('Ship the Thing')).toBe('ship-the-thing');@@ -11,6 +16,16 @@ describe('taskTitleSlug', () => {expect(taskTitleSlug('飞书适配器支持 POST 图文消息')).toBe('飞书适配器支持-post-图文消息');});+ // Regression: the character class allowed only letters and digits, so the+ // combining marks these scripts are built from were treated as separators+ // and each word came out shredded (`कार्य पूरा करें` → `क-र-य-प-र-कर`). CJK+ // needs no marks, which is why every existing case missed it.+ it('keeps combining marks so mark-bearing scripts stay readable', () => {+ expect(taskTitleSlug('कार्य पूरा करें')).toBe('कार्य-पूरा-करें');+ expect(taskTitleSlug('สวัสดี')).toBe('สวัสดี');+ expect(taskTitleSlug('مَرْحَبًا')).toBe('مَرْحَبًا');+ });+it('collapses punctuation, symbols and repeated separators into one dash', () => {expect(taskTitleSlug('fix: the bug!! (again)')).toBe('fix-the-bug-again');expect(taskTitleSlug('a___b')).toBe('a-b');@@ -42,6 +57,25 @@ describe('taskTitleSlug', () => {expect(slug.includes('�')).toBe(false);});+ it('truncates by grapheme cluster so a combining mark keeps its base letter', () => {+ // `कि` is two code points (base + matra) and one cluster. Slicing by code+ // point would cut a cluster in half and strand a matra in the URL.+ const slug = taskTitleSlug('कि'.repeat(TASK_SLUG_MAX_LENGTH + 10));++ expect(toGraphemes(slug)).toHaveLength(TASK_SLUG_MAX_LENGTH);+ expect(slug).toBe('कि'.repeat(TASK_SLUG_MAX_LENGTH));+ });++ it('bounds the slug by code points, not only by grapheme count', () => {+ // One base letter plus 10k combining accents is a SINGLE grapheme, so a+ // grapheme-only cap left it whole — a ~20KB path segment past what browsers+ // and proxies accept. Titles arrive from imported and generated content,+ // so the bound has to hold for input nobody typed.+ const slug = taskTitleSlug(`a${'\u0301'.repeat(10_000)}`);++ expect([...slug].length).toBeLessThanOrEqual(4 * TASK_SLUG_MAX_LENGTH);+ });+it('emits only characters that are legal in a path segment', () => {expect(taskTitleSlug('a/b?c#d e%f')).toBe('a-b-c-d-e-f');});diff --git a/packages/utils/src/taskSlug.ts b/packages/utils/src/taskSlug.tsindex c4a10797b33..71bc6dabd0c 100644--- a/packages/utils/src/taskSlug.ts+++ b/packages/utils/src/taskSlug.ts@@ -8,20 +8,61 @@/** Long enough to read the task at a glance, short enough to stay pasteable. */export const TASK_SLUG_MAX_LENGTH = 60;+/**+ * Ceiling on the code points a slug may carry, independent of how many+ * graphemes that is.+ *+ * Grapheme counting alone is not a size bound: a single cluster accepts an+ * unlimited run of combining marks, so `a` plus 10k accents is one grapheme and+ * a ~20KB path segment — past what browsers and proxies accept in a request+ * line. Titles arrive from imported and generated content, so the bound has to+ * hold for input nobody typed by hand.+ */+const TASK_SLUG_MAX_CODE_POINTS = 4 * TASK_SLUG_MAX_LENGTH;+const SEPARATOR_RUN = /^-+|-+$/g;-/** Everything that isn't a Unicode letter or digit collapses into one `-`. */-const NON_SLUG_RUN = /[^\p{L}\p{N}]+/gu;+/**+ * Everything that isn't a Unicode letter, digit or combining mark collapses+ * into one `-`.+ *+ * `\p{M}` is not decoration: Devanagari matras, Thai vowel signs and Arabic+ * harakat are separate code points that NFKC does not fold into their base+ * letter, so dropping marks shreds those scripts one character at a time+ * (`कार्य पूरा करें` → `क-र-य-प-र-कर`). CJK happened to be unaffected, which is+ * why the original character class read as correct.+ */+const NON_SLUG_RUN = /[^\p{L}\p{N}\p{M}]+/gu;const trimSeparators = (value: string) => value.replaceAll(SEPARATOR_RUN, '');+/**+ * Grapheme segmenter, built once — constructing one per call shows up on list+ * renders that build a link per row. `undefined` locale is deliberate: grapheme+ * boundaries are locale-independent for the scripts this has to protect.+ */+const graphemeSegmenter =+ typeof Intl !== 'undefined' && 'Segmenter' in Intl+ ? new Intl.Segmenter(undefined, { granularity: 'grapheme' })+ : undefined;++/**+ * Split into user-perceived characters. Falls back to code points where+ * `Intl.Segmenter` is missing (Firefox < 125, older runtimes) — that still+ * keeps surrogate pairs intact, it just can't protect combining marks.+ */+const toGraphemes = (value: string): string[] =>+ graphemeSegmenter+ ? [...graphemeSegmenter.segment(value)].map((entry) => entry.segment)+ : [...value];+/*** Build the slug segment for a task title.*- * The output is restricted to Unicode letters, digits and `-`, which are all- * legal in a path segment — so the link needs no percent-encoding and a copied- * URL stays readable. CJK titles keep their own characters rather than being- * transliterated: losing them would defeat the point of the slug.+ * The output is restricted to Unicode letters, digits, combining marks and `-`,+ * which are all legal in a path segment — so the link needs no percent-encoding+ * and a copied URL stays readable. CJK titles keep their own characters rather+ * than being transliterated: losing them would defeat the point of the slug.** Returns `''` for an empty or punctuation-only title, which keeps the URL at* its bare `/task/:taskId` form instead of appending a dangling segment.@@ -33,10 +74,26 @@ export const taskTitleSlug = (title?: string | null): string => {title.normalize('NFKC').toLowerCase().replaceAll(NON_SLUG_RUN, '-'),);- // Slice by code point, not UTF-16 unit, so a truncation can't cut a surrogate- // pair in half and leave a lone half-character in the URL.- const codePoints = [...normalized];- if (codePoints.length <= TASK_SLUG_MAX_LENGTH) return normalized;+ // Slice by grapheme cluster, not UTF-16 unit or code point: a cut mid-cluster+ // either halves a surrogate pair or strands a combining mark without its base+ // letter, both of which put a broken character in the URL.+ const graphemes = toGraphemes(normalized);+ const kept: string[] = [];+ let codePoints = 0;++ for (const grapheme of graphemes) {+ if (kept.length >= TASK_SLUG_MAX_LENGTH) break;++ const size = [...grapheme].length;+ // Keep whole clusters only: dropping the one that would breach the ceiling+ // beats emitting a half-cluster to fill the remaining budget.+ if (codePoints + size > TASK_SLUG_MAX_CODE_POINTS) break;++ kept.push(grapheme);+ codePoints += size;+ }++ if (kept.length === graphemes.length) return normalized;- return trimSeparators(codePoints.slice(0, TASK_SLUG_MAX_LENGTH).join(''));+ return trimSeparators(kept.join(''));};diff --git a/src/features/AgentTasks/AgentTaskDetail/useTaskCopyActions.ts b/src/features/AgentTasks/AgentTaskDetail/useTaskCopyActions.tsindex aca17a1861c..698833a149b 100644--- a/src/features/AgentTasks/AgentTaskDetail/useTaskCopyActions.ts+++ b/src/features/AgentTasks/AgentTaskDetail/useTaskCopyActions.ts@@ -22,7 +22,7 @@ export const useTaskCopyActions = () => {const activeWorkspaceSlug = useActiveWorkspaceSlug();const taskId = useTaskStore(taskDetailSelectors.activeTaskId);const taskAgentId = useTaskStore(taskDetailSelectors.activeTaskAgentId);- const taskName = useTaskStore(taskDetailSelectors.activeTaskName);+ const taskTitle = useTaskStore(taskDetailSelectors.activeTaskName);const copyId = useCallback(async () => {if (!taskId) return;@@ -36,13 +36,13 @@ export const useTaskCopyActions = () => {// Carry the title into the copied link so a pasted URL says what the task is.const taskUrl = `${appOrigin}${buildWorkspaceAwarePath(- taskDetailPath(taskId, taskAgentId ?? undefined, taskName),+ taskDetailPath(taskId, taskAgentId ?? undefined, taskTitle),activeWorkspaceSlug,)}`;await copyToClipboard(taskUrl);toast.success(t('taskList.contextMenu.copyLinkSuccess'));- }, [taskId, taskAgentId, taskName, appOrigin, activeWorkspaceSlug, t]);+ }, [taskId, taskAgentId, taskTitle, appOrigin, activeWorkspaceSlug, t]);return { copyId, copyLink, taskId };};diff --git a/src/features/AgentTasks/shared/useCanonicalTaskSlug.test.ts b/src/features/AgentTasks/shared/useCanonicalTaskSlug.test.tsindex b5091ac092a..4369fab99e1 100644--- a/src/features/AgentTasks/shared/useCanonicalTaskSlug.test.ts+++ b/src/features/AgentTasks/shared/useCanonicalTaskSlug.test.ts@@ -25,12 +25,14 @@ vi.mock('@/business/client/hooks/useActiveWorkspaceSlug', () => ({useActiveWorkspaceSlug: () => null,}));-const setTaskName = (name?: string) => {+const setTaskDetail = (detail?: { instruction?: string; name?: string | null }) => {useTaskStore.setState({- taskDetailMap: name === undefined ? {} : ({ 'T-1': { name } } as never),+ taskDetailMap: detail === undefined ? {} : ({ 'T-1': detail } as never),});};+const setTaskName = (name?: string) => setTaskDetail(name === undefined ? undefined : { name });+describe('useCanonicalTaskSlug', () => {beforeEach(() => {mocks.navigate.mockClear();@@ -102,6 +104,26 @@ describe('useCanonicalTaskSlug', () => {expect(mocks.navigate).toHaveBeenCalledWith('/task/T-1', { replace: true });});+ it('leaves a nameless task at its bare id instead of slugging the instruction', () => {+ // A task's instruction is a prompt body: putting it in the path would leak+ // it into history, analytics page views and every copied link. A task with+ // no name simply has no slug.+ setTaskDetail({ instruction: 'Fallback to instruction', name: null });++ renderHook(() => useCanonicalTaskSlug('T-1'));++ expect(mocks.navigate).not.toHaveBeenCalled();+ });++ it('strips an instruction slug someone hand-edited into the URL', () => {+ mocks.params = { slug: 'fallback-to-instruction' };+ setTaskDetail({ instruction: 'Fallback to instruction', name: null });++ renderHook(() => useCanonicalTaskSlug('T-1'));++ expect(mocks.navigate).toHaveBeenCalledWith('/task/T-1', { replace: true });+ });+it('leaves the URL alone while the title is still unknown', () => {mocks.params = { slug: 'an-incoming-slug' };diff --git a/src/features/AgentTasks/shared/useCanonicalTaskSlug.ts b/src/features/AgentTasks/shared/useCanonicalTaskSlug.tsindex f7db5db86bf..f0966669d43 100644--- a/src/features/AgentTasks/shared/useCanonicalTaskSlug.ts+++ b/src/features/AgentTasks/shared/useCanonicalTaskSlug.ts@@ -36,7 +36,9 @@ export const useCanonicalTaskSlug = (taskId?: string) => {// resolved state (clearing the input persists `name: ''`), and folding it in// with "not loaded yet" would pin the URL to the slug of the old title.const isLoaded = useTaskStore((s) => (taskId ? Boolean(s.taskDetailMap[taskId]) : false));- const name = useTaskStore((s) => (taskId ? s.taskDetailMap[taskId]?.name : undefined));+ // `name` only, and the link builders agree: a task's instruction is a prompt+ // body, not a title, and must never reach a URL (see `taskTitleSlug`).+ const title = useTaskStore((s) => (taskId ? (s.taskDetailMap[taskId]?.name ?? '') : ''));useEffect(() => {// Before the detail resolves the title is unknown — leaving the URL alone@@ -44,16 +46,16 @@ export const useCanonicalTaskSlug = (taskId?: string) => {// resolved an empty title is honoured, collapsing the URL to `/task/:id`.if (!taskId || !isLoaded) return;- const expected = taskTitleSlug(name);+ const expected = taskTitleSlug(title);if ((slug ?? '') === expected) return;// Rebuild from the route params rather than the raw pathname so the// workspace prefix and agent scope of the current URL survive untouched;// `escape` then stops the workspace-aware navigate re-prefixing them.const prefix = workspaceSlug ? `/${workspaceSlug}` : '';- navigate(`${prefix}${taskDetailPath(taskId, aid, name)}${search}${hash}`, {+ navigate(`${prefix}${taskDetailPath(taskId, aid, title)}${search}${hash}`, {escape: true,replace: true,});- }, [aid, hash, isLoaded, name, navigate, search, slug, taskId, workspaceSlug]);+ }, [aid, hash, isLoaded, navigate, search, slug, taskId, title, workspaceSlug]);};diff --git a/src/features/Home/Recents/ConnectedItem.tsx b/src/features/Home/Recents/ConnectedItem.tsxindex 85b35d4736c..7d67f5baa6f 100644--- a/src/features/Home/Recents/ConnectedItem.tsx+++ b/src/features/Home/Recents/ConnectedItem.tsx@@ -18,9 +18,14 @@ const ConnectedItem = memo<ConnectedItemProps>(({ itemRef, queryKey, scope }) =>const item = useHomeStore(homeRecentSelectors.item(scope, queryKey, itemRef));if (!item) return null;+ // `slugTitle`, not `title`: the displayed title falls back to the task's+ // instruction, and feeding that into the path would publish a prompt body to+ // browser history, analytics and every copied link. `slugTitle` is the task's+ // own name, which is also what the detail page canonicalises to — so the slug+ // this link carries survives arrival instead of being rewritten.const route =item.type === 'task'- ? taskDetailPath(item.id, item.agentId ?? undefined, item.title)+ ? taskDetailPath(item.id, item.agentId ?? undefined, item.slugTitle): item.routePath;return (diff --git a/src/features/Portal/TaskDetail/Header.tsx b/src/features/Portal/TaskDetail/Header.tsxindex d5b85fdebdb..d8f67e68512 100644--- a/src/features/Portal/TaskDetail/Header.tsx+++ b/src/features/Portal/TaskDetail/Header.tsx@@ -23,14 +23,14 @@ const TaskDetailHeader = memo(() => {const agentId = useTaskStore((state) =>taskId ? (state.taskDetailMap[taskId]?.agentId ?? undefined) : undefined,);- const taskName = useTaskStore((state) =>+ const taskTitle = useTaskStore((state) =>taskId ? (state.taskDetailMap[taskId]?.name ?? undefined) : undefined,);const pageUrl = getTaskDetailPageUrl({agentId,appOrigin,taskId,- title: taskName,+ title: taskTitle,workspaceSlug: activeWorkspaceSlug,});diff --git a/src/store/home/slices/recent/reducer.test.ts b/src/store/home/slices/recent/reducer.test.tsindex 6b855666b4f..d8ad60a8639 100644--- a/src/store/home/slices/recent/reducer.test.ts+++ b/src/store/home/slices/recent/reducer.test.ts@@ -8,6 +8,9 @@ const item = (id: string, title: string, type: RecentItem['type'] = 'task'): Recicon: type,id,routePath: '/',+ // Mirrors the server payload: a task's slug source is its name, topics and+ // documents have none.+ slugTitle: type === 'task' ? title : null,status: null,title,type,@@ -82,6 +85,39 @@ describe('recentReducer', () => {expect(next.recentsByScope.scope.queries.drawer.items[1].title).toBe('Document');});+ it('moves a task slug source with a committed rename', () => {+ // Regression: the row's link is built from `slugTitle`, so leaving it on the+ // old name made the href slug the previous title until the next server sync+ // — the same link/canonicaliser disagreement this feature exists to remove.+ const next = recentReducer(state([item('task', 'Draft')]), {+ entityType: 'task',+ id: 'task',+ mutationId: 1,+ scope: 'scope',+ title: 'Renamed',+ type: 'commitTitle',+ });++ const renamed = next.recentsByScope.scope.queries.compact.items[0];+ expect(renamed.title).toBe('Renamed');+ expect(renamed.slugTitle).toBe('Renamed');+ });++ it('leaves a document slug source alone on rename', () => {+ const next = recentReducer(state([item('task', 'Draft')]), {+ entityType: 'document',+ id: 'document',+ mutationId: 1,+ scope: 'scope',+ title: 'Renamed doc',+ type: 'commitTitle',+ });++ const renamed = next.recentsByScope.scope.queries.drawer.items.find((i) => i.id === 'document');+ expect(renamed?.title).toBe('Renamed doc');+ expect(renamed?.slugTitle).toBeNull();+ });+it('does not roll back a newer optimistic mutation', () => {const current = state([item('task', 'Draft')]);const optimistic = recentReducer(current, {diff --git a/src/store/home/slices/recent/reducer.ts b/src/store/home/slices/recent/reducer.tsindex 9d7a1f951a4..84f51dff2f2 100644--- a/src/store/home/slices/recent/reducer.ts+++ b/src/store/home/slices/recent/reducer.ts@@ -48,7 +48,11 @@ const updateRecentTitle = (const nextItems = items.map((item) => {if (item.type !== entityType || item.id !== id || item.title === title) return item;changed = true;- return { ...item, title };+ // Renaming a task sets `tasks.name`, which is exactly what `slugTitle`+ // carries — move it with the title or the row's link keeps slugging the old+ // name until the next server sync. Topics and documents have no slug+ // source, so leave theirs alone.+ return item.type === 'task' ? { ...item, slugTitle: title, title } : { ...item, title };});return changed ? nextItems : items;diff --git a/src/store/home/slices/recent/selectors.ts b/src/store/home/slices/recent/selectors.tsindex 993226a6671..fca0d01eb8d 100644--- a/src/store/home/slices/recent/selectors.ts+++ b/src/store/home/slices/recent/selectors.ts@@ -13,9 +13,14 @@ const item = (scope: string, queryKey: string, ref: RecentEntityRef) => (s: Home);const optimisticTitle = scopedState?.optimisticTitles[ref]?.title;- return recentItem && optimisticTitle !== undefined- ? { ...recentItem, title: optimisticTitle }- : recentItem;+ if (!recentItem || optimisticTitle === undefined) return recentItem;++ // A pending task rename has to carry the slug source with it, so the row's+ // link is built from the name the user just typed rather than the one the+ // server still has.+ return recentItem.type === 'task'+ ? { ...recentItem, slugTitle: optimisticTitle, title: optimisticTitle }+ : { ...recentItem, title: optimisticTitle };};export const homeRecentSelectors = {