UI links point at Hanzo Flow and anonymous visits stop retrying refresh

The auto_login probe answers 403 when auto-login is off. The response
interceptor read that as an expired session, called /v1/refresh four
times, logged out and left an unhandled rejection; it now leaves the
probe to useGetAutoLogin, which already handles that answer.

GitHub stars, crash-report links and documentation links named
flow-ai/flow, flow.org and docs.flow.org, which belong to other
projects. They now name hanzoai/flow, hanzo.ai/flow and
docs.hanzo.ai/flow, as the backend components do. The help menu drops
the Flow Desktop download, which has no Hanzo build, along with the
unused isAuthorizedURL helper.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
zooqueen
2026-09-15 12:11:39 -07:00
co-authored by Hanzo Dev
parent 27b12fc2a2
commit 495df01b80
25 changed files with 20 additions and 79 deletions
@@ -28,7 +28,7 @@ export default function CrashErrorComponent({
<p>
Please report errors with detailed tracebacks on the{" "}
<a
href="https://github.com/flow-ai/flow/issues"
href="https://github.com/hanzoai/flow/issues"
target="_blank"
rel="noopener noreferrer"
className="font-medium hover:underline"
@@ -47,7 +47,7 @@ export default function CrashErrorComponent({
<Button onClick={resetErrorBoundary}>Restart HanzoFlow</Button>
<a
href="https://github.com/flow-ai/flow/issues/new"
href="https://github.com/hanzoai/flow/issues/new"
target="_blank"
rel="noopener noreferrer"
>
@@ -4,7 +4,6 @@ import { HelpDropdownView } from "@/components/core/canvasControlsComponent/Help
import {
BUG_REPORT_URL,
DATASTAX_DOCS_URL,
DESKTOP_URL,
DOCS_URL,
} from "@/constants/constants";
import { ENABLE_DATASTAX_FLOW } from "@/customization/feature-flags";
@@ -44,7 +43,7 @@ const HelpDropdown = () => {
onToggleInspectionPanel={onToggleInspectionPanel}
navigateTo={(path) => navigate(path)}
openLink={(url) => window.open(url, "_blank")}
urls={{ docs: docsUrl, bugReport: BUG_REPORT_URL, desktop: DESKTOP_URL }}
urls={{ docs: docsUrl, bugReport: BUG_REPORT_URL }}
/>
);
};
@@ -22,7 +22,6 @@ export type HelpDropdownViewProps = {
urls: {
docs: string;
bugReport: string;
desktop: string;
};
};
@@ -81,13 +80,6 @@ export const HelpDropdownView = ({
onClick={() => openLink(urls.bugReport)}
/>
<Separator />
<DropdownControlButton
iconName="download"
testId="canvas_controls_dropdown_get_flow_desktop"
label={t("help.getFlowDesktop")}
externalLink
onClick={() => openLink(urls.desktop)}
/>
<DropdownControlButton
iconName={!helperLineEnabled ? "UnfoldHorizontal" : "FoldHorizontal"}
testId="canvas_controls_dropdown_enable_smart_guides"
@@ -41,8 +41,7 @@ jest.mock("@/components/common/genericIconComponent", () => ({
jest.mock("@/constants/constants", () => ({
__esModule: true,
DATASTAX_DOCS_URL: "https://docs.datastax.com",
DOCS_URL: "https://docs.flow.org",
DESKTOP_URL: "https://desktop.flow.org",
DOCS_URL: "https://docs.hanzo.ai/flow",
}));
jest.mock("@/customization/feature-flags", () => ({
@@ -100,19 +99,11 @@ describe("HelpDropdown", () => {
fireEvent.click(screen.getByTestId("canvas_controls_dropdown_docs"));
expect(window.open).toHaveBeenCalledWith(
"https://docs.flow.org",
"https://docs.hanzo.ai/flow",
"_blank",
);
fireEvent.click(screen.getByTestId("canvas_controls_dropdown_shortcuts"));
expect(mockNavigate).toHaveBeenCalledWith("/settings/shortcuts");
fireEvent.click(
screen.getByTestId("canvas_controls_dropdown_get_flow_desktop"),
);
expect(window.open).toHaveBeenCalledWith(
"https://desktop.flow.org",
"_blank",
);
});
});
@@ -65,7 +65,6 @@ describe("HelpDropdownView", () => {
const urls = {
docs: "https://docs",
bugReport: "https://bugs",
desktop: "https://desktop",
};
render(
@@ -91,11 +90,6 @@ describe("HelpDropdownView", () => {
);
expect(openLink).toHaveBeenCalledWith("https://bugs");
fireEvent.click(
screen.getByTestId("canvas_controls_dropdown_get_flow_desktop"),
);
expect(openLink).toHaveBeenCalledWith("https://desktop");
fireEvent.click(
screen.getByTestId("canvas_controls_dropdown_enable_smart_guides"),
);
@@ -77,7 +77,7 @@ describe("NoInputView", () => {
expect(link).toBeInTheDocument();
expect(link).toHaveAttribute(
"href",
"https://docs.flow.org/components-io#chat-input",
"https://docs.hanzo.ai/flow/components-io#chat-input",
);
expect(link).toHaveAttribute("target", "_blank");
});
@@ -42,7 +42,7 @@ const NoInputView = ({
<a
className="underline underline-offset-4"
target="_blank"
href="https://docs.flow.org/components-io#chat-input"
href="https://docs.hanzo.ai/flow/components-io#chat-input"
rel="noopener noreferrer"
>
Chat Input
+1 -2
View File
@@ -992,10 +992,9 @@ export const DEFAULT_FILE_PICKER_TIMEOUT = 60000;
export const DISCORD_URL = "https://discord.com/invite/EqksyE2EX9";
export const GITHUB_URL = "https://github.com/hanzoai/flow";
export const TWITTER_URL = "https://x.com/flow_ai";
export const DOCS_URL = "https://docs.flow.org";
export const DOCS_URL = "https://docs.hanzo.ai/flow";
export const DATASTAX_DOCS_URL =
"https://docs.datastax.com/en/flow/index.html";
export const DESKTOP_URL = "https://www.flow.org/desktop";
export const BUG_REPORT_URL = "https://github.com/hanzoai/flow/issues";
export const UUID_PARSING_ERROR = "uuid_parsing";
+3 -30
View File
@@ -78,7 +78,8 @@ function ApiInterceptor() {
if (shouldRetryRefresh) {
if (
error?.config?.url?.includes("github") ||
error?.config?.url?.includes("public")
error?.config?.url?.includes("public") ||
error?.config?.url?.includes("auto_login")
) {
return Promise.reject(error);
}
@@ -98,32 +99,6 @@ function ApiInterceptor() {
},
);
const isAuthorizedURL = (url) => {
const authorizedDomains = [
"https://raw.githubusercontent.com/flow-ai/flow_examples/main/examples",
"https://api.github.com/repos/flow-ai/flow_examples/contents/examples",
"https://api.github.com/repos/flow-ai/flow",
"auto_login",
];
const authorizedEndpoints = ["auto_login"];
try {
const parsedURL = new URL(url);
const isDomainAllowed = authorizedDomains.some(
(domain) => parsedURL.origin === new URL(domain).origin,
);
const isEndpointAllowed = authorizedEndpoints.some((endpoint) =>
parsedURL.pathname.includes(endpoint),
);
return isDomainAllowed || isEndpointAllowed;
} catch (_e) {
// Invalid URL
return false;
}
};
// Check for external url which we don't want to add custom headers to
const isExternalURL = (url: string): boolean => {
const EXTERNAL_DOMAINS = [
@@ -208,10 +183,8 @@ function ApiInterceptor() {
setAuthenticationErrorCount(0);
await remakeRequest(error);
},
onError: (error) => {
console.error(error);
onError: () => {
mutationLogout();
return Promise.reject("Authentication error");
},
});
}
@@ -5,7 +5,7 @@ export const API_ROUTES = ["^/v1/", "^/v2/", "/health"];
export const BASE_URL_API = "/v1/";
export const BASE_URL_API_V2 = "/v2/";
export const HEALTH_CHECK_URL = "/health_check";
export const DOCS_LINK = "https://docs.flow.org";
export const DOCS_LINK = "https://docs.hanzo.ai/flow";
export default {
DOCS_LINK,
+1 -1
View File
@@ -12,5 +12,5 @@ export function getHealthCheckUrl(): string {
}
export const FlowButtonRedirectTarget = () => {
return "https://flow.org";
return "https://hanzo.ai/flow";
};
-1
View File
@@ -154,7 +154,6 @@
"header.notificationsLabel": "Benachrichtigungen",
"help.docs": "Dokumente",
"help.enableSmartGuides": "Intelligente Hilfslinien aktivieren",
"help.getFlowDesktop": "Flow Desktop herunterladen",
"help.reportBug": "Fehler melden",
"help.shortcuts": "Direktaufrufe",
"help.showInspectorPanel": "Inspektorfenster anzeigen",
-1
View File
@@ -315,7 +315,6 @@
"help.docs": "Docs",
"help.shortcuts": "Shortcuts",
"help.reportBug": "Report a bug",
"help.getFlowDesktop": "Get Flow Desktop",
"help.enableSmartGuides": "Enable smart guides",
"help.showInspectorPanel": "Show Inspector Panel",
"mainPage.mcpServer": "MCP Server",
-1
View File
@@ -154,7 +154,6 @@
"header.notificationsLabel": "Notificaciones",
"help.docs": "Documentos",
"help.enableSmartGuides": "Activar guías inteligentes",
"help.getFlowDesktop": "Descargar Flow Desktop",
"help.reportBug": "Informar de un error",
"help.shortcuts": "Atajos",
"help.showInspectorPanel": "Mostrar el panel del inspector",
-1
View File
@@ -154,7 +154,6 @@
"header.notificationsLabel": "Notifications",
"help.docs": "Documents",
"help.enableSmartGuides": "Activer les guides intelligents",
"help.getFlowDesktop": "Télécharger Flow Desktop",
"help.reportBug": "Signaler un bug",
"help.shortcuts": "Raccourcis",
"help.showInspectorPanel": "Afficher le panneau d'inspection",
-1
View File
@@ -154,7 +154,6 @@
"header.notificationsLabel": "通知",
"help.docs": "文書",
"help.enableSmartGuides": "スマートガイドを有効にする",
"help.getFlowDesktop": "Flow Desktopを入手する",
"help.reportBug": "バグを報告する",
"help.shortcuts": "ショートカット",
"help.showInspectorPanel": "インスペクタパネルを表示",
-1
View File
@@ -154,7 +154,6 @@
"header.notificationsLabel": "Notificações",
"help.docs": "Documentos",
"help.enableSmartGuides": "Ativar guias inteligentes",
"help.getFlowDesktop": "Baixe o Flow Desktop",
"help.reportBug": "Relatar um erro",
"help.shortcuts": "Atalhos",
"help.showInspectorPanel": "Mostrar painel do inspetor",
-1
View File
@@ -154,7 +154,6 @@
"header.notificationsLabel": "通知",
"help.docs": "文档",
"help.enableSmartGuides": "启用智能参考线",
"help.getFlowDesktop": "获取 Flow 桌面版",
"help.reportBug": "报告错误",
"help.shortcuts": "快捷方式",
"help.showInspectorPanel": "显示检查器面板",
@@ -51,7 +51,7 @@ const NoInputView: React.FC<NoInputViewProps> = ({
<a
className="underline underline-offset-4"
target="_blank"
href="https://docs.flow.org/components-io#chat-input"
href="https://docs.hanzo.ai/flow/components-io#chat-input"
rel="noopener"
>
Chat Input
@@ -68,7 +68,7 @@ export function SaveChangesModal({
<a
target="_blank"
className="text-accent-pink-foreground hover:underline"
href="https://docs.flow.org/environment-variables#visual-editor-and-playground-behavior"
href="https://docs.hanzo.ai/flow/environment-variables#visual-editor-and-playground-behavior"
rel="noopener"
>
Enable auto-saving
@@ -179,7 +179,7 @@ export const McpJsonContent = ({
<div className="px-2 text-mmd text-muted-foreground">
Add this config to your client of choice. Need help? See the{" "}
<a
href="https://docs.flow.org/mcp-server#connect-clients-to-use-the-servers-actions"
href="https://docs.hanzo.ai/flow/mcp-server#connect-clients-to-use-the-servers-actions"
target="_blank"
rel="noreferrer"
className="text-accent-pink-foreground"
@@ -75,7 +75,7 @@ const McpServerTab = ({ folderName }: { folderName: string }) => {
in our
<a
className="text-accent-pink-foreground"
href="https://docs.flow.org/mcp-server"
href="https://docs.hanzo.ai/flow/mcp-server"
target="_blank"
rel="noreferrer"
>
@@ -147,7 +147,7 @@ describe("McpJsonContent", () => {
const link = screen.getByText("setup guide").closest("a");
expect(link).toHaveAttribute(
"href",
expect.stringContaining("docs.flow.org"),
expect.stringContaining("docs.hanzo.ai/flow"),
);
});
+1 -1
View File
@@ -38,7 +38,7 @@ export const useDarkStore = create<DarkStoreType>((set, get) => ({
// if lastUpdated is null or the difference is greater than 2 hours
if (lastUpdated === null || diff > 7200000) {
getRepoStars("flow-ai", "flow").then((res) => {
getRepoStars("hanzoai", "flow").then((res) => {
window.localStorage.setItem("githubStars", res?.toString() ?? "0");
window.localStorage.setItem(
"githubStarsLastUpdated",
@@ -35,7 +35,7 @@ const mockAPIData: APIDataType = {
icon: "cirleQuestionMark",
base_classes: ["Data"],
display_name: "Mock Component",
documentation: "https://docs.flow.org/",
documentation: "https://docs.hanzo.ai/flow/",
minimized: false,
custom_fields: {},
output_types: [],