AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix(web): refine Paw discovery entry
tianma-if0afdab17d657
diff --git a/apps/web/src/components/CompanionDiscoveryHub.test.mjs b/apps/web/src/components/CompanionDiscoveryHub.test.mjsindex 101c30ec..5514b1d0 100644--- a/apps/web/src/components/CompanionDiscoveryHub.test.mjs+++ b/apps/web/src/components/CompanionDiscoveryHub.test.mjs@@ -23,10 +23,17 @@ async function render(enabled, locale = "zh-CN", card = false, settings = {}, itclient.clear(); return result;}describe("quiet discovery UI", () => {- test("disabled means no notification entry or panel", async () => { expect(await render(false)).toBe(""); });- test("enabled shows only a quiet bell, not an automatically opened dialog", async () => {+ test("disabled hides the Paw mode entry and panel", async () => {+ const html = await render(false);+ expect(html).toBe("");+ expect(html).not.toContain("lucide-paw-print");+ });+ test("enabled shows only a quiet paw, not an automatically opened dialog", async () => {const html = await render(true);- expect(html).toContain('aria-label="来自 EdgeEver 的发现"');+ expect(html).toContain('aria-label="来自猫爪的发现"');+ expect(html).toContain("lucide-paw-print");+ expect(html).not.toContain("lucide-bell");+ expect(html).not.toContain("fixed bottom-24");expect(html).not.toContain('role="dialog"'); expect(html).not.toContain("有新发现");});test("Paw mode explains benefits and exposes its inactive state without personalization controls", async () => {diff --git a/apps/web/src/components/CompanionDiscoveryHub.tsx b/apps/web/src/components/CompanionDiscoveryHub.tsxindex df30a7c7..fbd9b74f 100644--- a/apps/web/src/components/CompanionDiscoveryHub.tsx+++ b/apps/web/src/components/CompanionDiscoveryHub.tsx@@ -1,7 +1,7 @@import { useEffect, useRef, useState } from "react";import { useQuery, useQueryClient } from "@tanstack/react-query";import { useTranslation } from "react-i18next";-import { Bell } from "lucide-react";+import { PawPrint } from "lucide-react";import type { CompanionAction, CompanionDiscoveryItem } from "@edgeever/shared";import { Button } from "@/components/ui/button";import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@/components/ui/dialog";@@ -87,10 +87,10 @@ export default function CompanionDiscoveryHub({ scope, onOpenNote, onNotesChange<TooltipProvider delayDuration={0} skipDelayDuration={0}><Tooltip><TooltipTrigger asChild>- <Button variant="outline" size="icon" className="fixed bottom-24 right-4 z-40 h-9 w-9 rounded-full bg-background lg:bottom-4"+ <Button variant="ghost" size="icon" className="relative h-8 w-8 text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-950 focus-visible:ring-2 focus-visible:ring-emerald-500/70"aria-label={t("companion.discovery.title")} onClick={() => { setOpen(true); void feed.refetch(); }}>- <Bell className="h-4 w-4" aria-hidden="true" />- {items.some(item => !item.seen && item.action?.status !== "applied") ? <span aria-label={t("companion.discovery.unread")} className="absolute right-0 top-0 h-2 w-2 rounded-full bg-primary" /> : null}+ <PawPrint className="h-5 w-5" strokeWidth={2.25} aria-hidden="true" />+ {items.some(item => !item.seen && item.action?.status !== "applied") ? <span aria-label={t("companion.discovery.unread")} className="absolute right-1 top-1 h-1.5 w-1.5 rounded-full bg-emerald-500 ring-2 ring-white" /> : null}</Button></TooltipTrigger><TooltipContent>{t("companion.discovery.title")}</TooltipContent>diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsxindex 75ecb783..001adca1 100644--- a/apps/web/src/components/EditorPane.tsx+++ b/apps/web/src/components/EditorPane.tsx@@ -470,6 +470,7 @@ type EditorPaneProps = {pluginHost: EdgeEverPluginHost;pluginNavigationRequest?: { id: number; noteId: string; search: string } | null;onOpenExecutionCenter: () => void;+ companionDiscoveryHub?: ReactNode;};type RichEditorPaneProps = EditorPaneProps & {@@ -545,6 +546,7 @@ const RichEditorPane = ({pluginHost,pluginNavigationRequest,onOpenExecutionCenter,+ companionDiscoveryHub,onRequestMobileNativeEdit,}: RichEditorPaneProps) => {const { t, i18n } = useTranslation();@@ -4003,6 +4005,7 @@ const RichEditorPane = ({{deployedUpdateUnseen ? <span className="absolute right-1 top-1 h-1.5 w-1.5 rounded-full bg-emerald-500 ring-2 ring-white" /> : null}</Button></IconTooltip>+ {companionDiscoveryHub}<ExecutionCenterButton className="h-8 w-8" onClick={onOpenExecutionCenter} /><ThemeToggle />{!effectiveReadOnly && (diff --git a/apps/web/src/components/WorkspaceApp.tsx b/apps/web/src/components/WorkspaceApp.tsxindex 9d504f12..4cb63d6e 100644--- a/apps/web/src/components/WorkspaceApp.tsx+++ b/apps/web/src/components/WorkspaceApp.tsx@@ -3399,6 +3399,15 @@ export const WorkspaceApp = ({><EditorPaneonOpenExecutionCenter={handleOpenExecutionCenter}+ companionDiscoveryHub={authRequired && Boolean(user) && !demoMode ? (+ <Suspense fallback={null}>+ <CompanionDiscoveryHub key={localDataScope} scope={localDataScope} onOpenNote={handleOpenPluginNote} onOpenSettings={handleOpenSettings}+ onNotesChanged={async () => {+ const result = await refreshWorkspaceFromServer("manual");+ if ("skipped" in result && result.skipped) throw new Error("Workspace refresh was skipped.");+ }} />+ </Suspense>+ ) : null}memo={selectedMemo}repository={repository}pluginHost={pluginHost}@@ -3590,13 +3599,6 @@ export const WorkspaceApp = ({options={requestedPluginPanel?.options}onClose={() => setRequestedPluginPanel(null)}/>- {authRequired && Boolean(user) && !demoMode ? <Suspense fallback={null}>- <CompanionDiscoveryHub key={localDataScope} scope={localDataScope} onOpenNote={handleOpenPluginNote} onOpenSettings={handleOpenSettings}- onNotesChanged={async () => {- const result = await refreshWorkspaceFromServer("manual");- if ("skipped" in result && result.skipped) throw new Error("Workspace refresh was skipped.");- }} />- </Suspense> : null}{visibleActivePane !== "editor" && !memoSelectionModeActive && (<MobileBottomNavactiveItem={mobileBottomNavActive}diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.tsindex 7de713cb..9d1bfbb9 100644--- a/packages/shared/src/i18n/en-US.ts+++ b/packages/shared/src/i18n/en-US.ts@@ -5,7 +5,7 @@ export const enUS = {companion: {discovery: {settingsTitle: "Paw mode",- title: "Discoveries from EdgeEver",+ title: "Discoveries from Paw mode",description: "When enabled, EdgeEver quietly helps tuck scattered fragments together, append new ideas to existing notes, and surface relevant past insights like a gentle cat paw.",tagline: "The longer you use it, the better Paw mode understands you.",enable: "Enable Paw mode",diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.tsindex 21a44168..c6a5518f 100644--- a/packages/shared/src/i18n/zh-CN.ts+++ b/packages/shared/src/i18n/zh-CN.ts@@ -5,7 +5,7 @@ export const zhCN = {companion: {discovery: {settingsTitle: "猫爪模式",- title: "来自 EdgeEver 的发现",+ title: "来自猫爪的发现",description: "开启后,EdgeEver 会像猫爪轻推纸片一样,帮你归拢零散碎片、将新想法沉淀到已有笔记、挑出过往的相关灵感。",tagline: "用得越久,猫爪越懂你。",enable: "启用猫爪模式",