Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(web): adjust AI assistant launcher spacing

tianma-if942ab74b418a
diff --git a/apps/web/src/components/DiagramEditorPane.tsx b/apps/web/src/components/DiagramEditorPane.tsx
index 9fbbe701..b754ddbb 100644
--- a/apps/web/src/components/DiagramEditorPane.tsx
+++ b/apps/web/src/components/DiagramEditorPane.tsx
@@ -3910,7 +3910,7 @@ export const DiagramEditorPane = ({
variant="outline"
size="icon"
data-ai-assistant-launcher=""
- className="absolute bottom-[calc(1.25rem+env(safe-area-inset-bottom))] right-5 z-30 size-11 rounded-full border-slate-200 bg-card text-slate-950 shadow-[0_8px_24px_rgba(15,23,42,0.14)] hover:bg-card hover:text-slate-950"
+ className="absolute bottom-[calc(1.25rem+env(safe-area-inset-bottom))] right-5 sm:bottom-[calc(2rem+env(safe-area-inset-bottom))] sm:right-8 z-30 size-11 rounded-full border-slate-200 bg-card text-slate-950 shadow-[0_8px_24px_rgba(15,23,42,0.14)] hover:bg-card hover:text-slate-950"
aria-label={t("aiAssistant.open")}
onClick={() => {
setAiSidebarOpen(true);
diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsx
index 202bcd42..0e2ae0cc 100644
--- a/apps/web/src/components/EditorPane.tsx
+++ b/apps/web/src/components/EditorPane.tsx
@@ -4586,7 +4586,7 @@ const RichEditorPane = ({
// The phone note view already has an edit button in this corner.
isMobileViewport && !mobileEditingActive
? "bottom-[calc(4.75rem+env(safe-area-inset-bottom))] right-4"
- : "bottom-[calc(1.25rem+env(safe-area-inset-bottom))] right-5",
+ : "bottom-[calc(1.25rem+env(safe-area-inset-bottom))] right-5 sm:bottom-[calc(2rem+env(safe-area-inset-bottom))] sm:right-8",
)}
aria-label={t("aiAssistant.open")}
onClick={openAiAssistant}
diff --git a/apps/web/src/components/InfographicEditorPane.tsx b/apps/web/src/components/InfographicEditorPane.tsx
index cae1b374..0187e0fc 100644
--- a/apps/web/src/components/InfographicEditorPane.tsx
+++ b/apps/web/src/components/InfographicEditorPane.tsx
@@ -768,7 +768,7 @@ export default function InfographicEditorPane({
variant="outline"
size="icon"
data-ai-assistant-launcher=""
- className="absolute bottom-[calc(1.25rem+env(safe-area-inset-bottom))] right-5 z-30 size-11 rounded-full border-slate-200 bg-card text-slate-950 shadow-[0_8px_24px_rgba(15,23,42,0.14)] hover:bg-card hover:text-slate-950"
+ className="absolute bottom-[calc(1.25rem+env(safe-area-inset-bottom))] right-5 sm:bottom-[calc(2rem+env(safe-area-inset-bottom))] sm:right-8 z-30 size-11 rounded-full border-slate-200 bg-card text-slate-950 shadow-[0_8px_24px_rgba(15,23,42,0.14)] hover:bg-card hover:text-slate-950"
aria-label={t("aiAssistant.open")}
onClick={() => setAiSidebarOpen(true)}
>
diff --git a/apps/web/src/components/PosterEditorPane.tsx b/apps/web/src/components/PosterEditorPane.tsx
index ef21c394..b931305f 100644
--- a/apps/web/src/components/PosterEditorPane.tsx
+++ b/apps/web/src/components/PosterEditorPane.tsx
@@ -2120,7 +2120,7 @@ export default function PosterEditorPane({
</Dialog>
{!readOnly && !aiAssistantOpen && <IconTooltip side="left" label={t("aiAssistant.open")}>
<Button variant="outline" size="icon" data-ai-assistant-launcher="" aria-label={t("aiAssistant.open")}
- className="absolute bottom-[calc(1.25rem+env(safe-area-inset-bottom))] right-5 z-30 size-11 rounded-full border-slate-200 bg-card text-slate-950 shadow-[0_8px_24px_rgba(15,23,42,0.14)]"
+ className="absolute bottom-[calc(4rem+env(safe-area-inset-bottom))] right-5 sm:bottom-[calc(4.75rem+env(safe-area-inset-bottom))] sm:right-8 z-30 size-11 rounded-full border-slate-200 bg-card text-slate-950 shadow-[0_8px_24px_rgba(15,23,42,0.14)]"
onClick={() => setAiSidebarOpen(true)}><Sparkles className="size-5" strokeWidth={1.75} /></Button>
</IconTooltip>}
</div>
diff --git a/apps/web/src/components/TableEditorPane.tsx b/apps/web/src/components/TableEditorPane.tsx
index ef9ccc50..f208b036 100644
--- a/apps/web/src/components/TableEditorPane.tsx
+++ b/apps/web/src/components/TableEditorPane.tsx
@@ -732,7 +732,7 @@ export const TableEditorPane = ({
variant="outline"
size="icon"
data-ai-assistant-launcher=""
- className="absolute bottom-[calc(1.25rem+env(safe-area-inset-bottom))] right-5 z-30 size-11 rounded-full border-slate-200 bg-card text-slate-950 shadow-[0_8px_24px_rgba(15,23,42,0.14)] hover:bg-card hover:text-slate-950"
+ className="absolute bottom-[calc(1.25rem+env(safe-area-inset-bottom))] right-5 sm:bottom-[calc(2rem+env(safe-area-inset-bottom))] sm:right-8 z-30 size-11 rounded-full border-slate-200 bg-card text-slate-950 shadow-[0_8px_24px_rgba(15,23,42,0.14)] hover:bg-card hover:text-slate-950"
aria-label={t("aiAssistant.open")}
onClick={() => {
setAiSidebarOpen(true);