Skip to content

Commit 7e84306

Browse files
author
Faxbot Agent
committed
fix(docs-base): move default docs to versioned path (4ee1fb9) and update UI links to avoid latest alias breakage
1 parent 530aeb2 commit 7e84306

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

api/admin_ui/src/components/Diagnostics.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function Diagnostics({ client, onNavigate, docsBase }: DiagnosticsProps) {
183183
useEffect(() => {
184184
const loadAnchors = async () => {
185185
try {
186-
const base = docsBase || 'https://docs.faxbot.net/latest';
186+
const base = docsBase || 'https://docs.faxbot.net/4ee1fb94';
187187
const topics: string[] = [ 'security', 'diagnostics', 'inbound', 'storage', 'plugins', 'mcp', 'scripts', 'setup', 'send', 'jobs', 'tunnels', 'keys', 'logs', 'sip', 'signalwire', 'freeswitch', 'documo' ];
188188
const provs = [active?.outbound, active?.inbound].filter(Boolean) as string[];
189189
for (const p of provs) { if (!topics.includes(p)) topics.push(p); }
@@ -373,41 +373,41 @@ function Diagnostics({ client, onNavigate, docsBase }: DiagnosticsProps) {
373373
docs.push({ text: 'FAX_DATA_DIR stores temporary files and fax artifacts.' });
374374
docs.push({ text: 'Default: /faxdata in container, ./faxdata locally' });
375375
docs.push({ text: 'Must be writable by the application process.' });
376-
docs.push({ text: 'Deployment Guide', href: `${docsBase || 'https://docs.faxbot.net/latest'}/deployment/` });
376+
docs.push({ text: 'Deployment Guide', href: `${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/deployment/` });
377377
}
378378
else if (key === 'database_connected') {
379379
docs.push({ text: 'Database stores job records and API keys.' });
380380
docs.push({ text: 'Default: SQLite at ./faxbot.db' });
381381
docs.push({ text: 'Production: Use PostgreSQL with DATABASE_URL' });
382-
docs.push({ text: 'Database Setup', href: `${docsBase || 'https://docs.faxbot.net/latest'}/deployment/` });
382+
docs.push({ text: 'Database Setup', href: `${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/deployment/` });
383383
}
384384
}
385385

386386
if (t.includes('phaxio')) {
387-
docs.push({ text: 'Phaxio Setup Guide', href: `${docsBase || 'https://docs.faxbot.net/latest'}/setup/phaxio/` });
387+
docs.push({ text: 'Phaxio Setup Guide', href: `${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/setup/phaxio/` });
388388
docs.push({ text: 'Phaxio Console', href: 'https://console.phaxio.com' });
389389
const add = (topic: string, text: string) => { const href = anchors[topic] || thirdParty[topic]; if (href) docs.push({ text, href }); };
390390
add('phaxio-webhook-hmac', 'Verify Phaxio inbound HMAC signatures');
391391
add('phaxio-status-callback-url', 'Set status callback URL (HTTPS required)');
392392
}
393393

394394
if (t.includes('sip')) {
395-
docs.push({ text: 'SIP/Asterisk Setup', href: `${docsBase || 'https://docs.faxbot.net/latest'}/setup/sip-asterisk/` });
395+
docs.push({ text: 'SIP/Asterisk Setup', href: `${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/setup/sip-asterisk/` });
396396
if (key === 'ami_password_not_default') {
397397
docs.push({ text: 'Change AMI password in both Asterisk manager.conf and ASTERISK_AMI_PASSWORD env var.' });
398398
}
399399
}
400400

401401
if (t.includes('security')) {
402-
docs.push({ text: 'Security Guide', href: `${docsBase || 'https://docs.faxbot.net/latest'}/security/` });
402+
docs.push({ text: 'Security Guide', href: `${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/security/` });
403403
const addSec = (topic: string, text: string) => { const href = anchors[topic] || thirdParty[topic]; if (href) docs.push({ text, href }); };
404404
addSec('enforce-https-phi', 'Enforce HTTPS for PHI (ENFORCE_PUBLIC_HTTPS)');
405405
addSec('require-api-key-production', 'Require API keys (REQUIRE_API_KEY)');
406406
addSec('audit-logging-hipaa', 'Enable audit logging');
407407
}
408408

409409
if (t.includes('sinch')) {
410-
docs.push({ text: 'Faxbot: Sinch Setup', href: `${docsBase || 'https://docs.faxbot.net/latest'}/setup/sinch/` });
410+
docs.push({ text: 'Faxbot: Sinch Setup', href: `${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/setup/sinch/` });
411411
docs.push({ text: 'Sinch Fax API', href: 'https://developers.sinch.com/docs/fax/api-reference/' });
412412
docs.push({ text: 'OAuth 2.0 for Fax API', href: 'https://developers.sinch.com/docs/fax/api-reference/authentication/oauth/' });
413413
docs.push({ text: 'Sinch Customer Dashboard (Access Keys – Build)', href: 'https://dashboard.sinch.com/settings/access-keys' });
@@ -423,7 +423,7 @@ function Diagnostics({ client, onNavigate, docsBase }: DiagnosticsProps) {
423423
}
424424

425425
if (t.includes('inbound')) {
426-
docs.push({ text: 'Inbound Overview', href: `${docsBase || 'https://docs.faxbot.net/latest'}/inbound/` });
426+
docs.push({ text: 'Inbound Overview', href: `${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/inbound/` });
427427
const addI = (topic: string, text: string) => { const href = anchors[topic] || thirdParty[topic]; if (href) docs.push({ text, href }); };
428428
addI('inbound-enable', 'Enable inbound receiving');
429429
addI('inbound-retention', 'Retention days');
@@ -433,7 +433,7 @@ function Diagnostics({ client, onNavigate, docsBase }: DiagnosticsProps) {
433433
}
434434

435435
if (t.includes('storage')) {
436-
docs.push({ text: 'Storage Guide', href: `${docsBase || 'https://docs.faxbot.net/latest'}/operations/` });
436+
docs.push({ text: 'Storage Guide', href: `${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/operations/` });
437437
const addSt = (topic: string, text: string) => { const href = anchors[topic] || thirdParty[topic]; if (href) docs.push({ text, href }); };
438438
addSt('storage-local-vs-s3', 'Local vs S3');
439439
addSt('storage-s3-kms', 'S3 KMS encryption');

api/admin_ui/src/components/Inbound.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function Inbound({ client, docsBase }: InboundProps) {
6767
const [faxToDelete, setFaxToDelete] = useState<string | null>(null);
6868
const [deleting, setDeleting] = useState(false);
6969
// Precise help anchors (lightweight resolver for inbound failures)
70-
const base = docsBase || 'https://docs.faxbot.net/latest';
70+
const base = docsBase || 'https://docs.faxbot.net/4ee1fb94';
7171
const anchors: Record<string,string> = {
7272
// Our docs pages
7373
'inbound-overview': `${base}/inbound/`,
@@ -381,7 +381,7 @@ function Inbound({ client, docsBase }: InboundProps) {
381381
You are not authorized to view inbound faxes. Use an API key with inbound:list and inbound:read.
382382
<Box sx={{ mt: 1, display: 'flex', gap: 1, flexWrap: 'wrap' }}>
383383
<Button size="small" variant="outlined" onClick={() => window.dispatchEvent(new CustomEvent('faxbot:navigate', { detail: 'settings/keys' }))}>Open API Keys</Button>
384-
<Button size="small" href={(docsBase || 'https://docs.faxbot.net/latest') + '/admin-console/api-keys/'} target="_blank" rel="noreferrer">Learn more</Button>
384+
<Button size="small" href={(docsBase || 'https://docs.faxbot.net/4ee1fb94') + '/admin-console/api-keys/'} target="_blank" rel="noreferrer">Learn more</Button>
385385
</Box>
386386
</Alert>
387387
)}
@@ -603,7 +603,7 @@ same => n,System(curl -s -X POST -H "Content-Type: application/json" -H "X-Inter
603603
</Button>
604604
<Button
605605
size="small"
606-
href={`${docsBase || 'https://docs.faxbot.net/latest'}/setup/sip-asterisk/`}
606+
href={`${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/setup/sip-asterisk/`}
607607
target="_blank"
608608
rel="noreferrer"
609609
fullWidth={isSmallMobile}

api/admin_ui/src/components/ScriptsTests.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ const ScriptsTests: React.FC<Props> = ({ client, docsBase, readOnly = false, can
205205

206206
const theme = useTheme();
207207

208-
const docsUrl = useMemo(() => `${docsBase || 'https://docs.faxbot.net/latest'}/tools/scripts-and-tests/`, [docsBase]);
208+
const docsUrl = useMemo(() => `${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/tools/scripts-and-tests/`, [docsBase]);
209209

210210
const pushAuth = (line: string) => setAuthLines((prev) => [...prev, line]);
211211
const clearAuth = () => setAuthLines([]);

api/admin_ui/src/components/Settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function Settings({ client, readOnly = false }: SettingsProps) {
5353
const [restartHint, setRestartHint] = useState<boolean>(false);
5454
const [allowRestart, setAllowRestart] = useState<boolean>(false);
5555
const [persistedEnabled, setPersistedEnabled] = useState<boolean>(false);
56-
const [docsBase, setDocsBase] = useState<string>('https://docs.faxbot.net/latest');
56+
const [docsBase, setDocsBase] = useState<string>('https://docs.faxbot.net/4ee1fb94');
5757
const [migrationBanner, setMigrationBanner] = useState<boolean>(false);
5858
const [importingEnv, setImportingEnv] = useState<boolean>(false);
5959
const [importResult, setImportResult] = useState<{discovered:number; prefixes:string[]} | null>(null);

api/admin_ui/src/components/SetupWizard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ function SetupWizard({ client, onDone, docsBase }: SetupWizardProps) {
487487
<Grid container spacing={2}>
488488
<Grid item xs={12}>
489489
<Typography variant="body2" color="text.secondary">
490-
See <a href={`${docsBase || 'https://docs.faxbot.net/latest'}/setup/sinch/`} target="_blank" rel="noreferrer">Faxbot: Sinch Setup</a> or the <a href="https://developers.sinch.com/docs/fax/api-reference/" target="_blank" rel="noreferrer">Sinch Fax API docs</a>.
490+
See <a href={`${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/setup/sinch/`} target="_blank" rel="noreferrer">Faxbot: Sinch Setup</a> or the <a href="https://developers.sinch.com/docs/fax/api-reference/" target="_blank" rel="noreferrer">Sinch Fax API docs</a>.
491491
</Typography>
492492
</Grid>
493493
<Grid item xs={12}>
@@ -793,7 +793,7 @@ function SetupWizard({ client, onDone, docsBase }: SetupWizardProps) {
793793
Paste this URL into your {(config.inbound_backend || config.outbound_backend || config.backend || 'phaxio').toUpperCase()} console for inbound fax delivery. For Sinch, set the webhook content type to application/json. Learn more:
794794
</Typography>
795795
<Box sx={{ mt: 1, display: 'flex', gap: 1, flexWrap: 'wrap' }}>
796-
<Button size="small" variant="outlined" href={`${docsBase || 'https://docs.faxbot.net/latest'}/setup/sinch/`} target="_blank" rel="noreferrer">Faxbot: Sinch Setup</Button>
796+
<Button size="small" variant="outlined" href={`${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/setup/sinch/`} target="_blank" rel="noreferrer">Faxbot: Sinch Setup</Button>
797797
<Button size="small" variant="outlined" href={`https://developers.sinch.com/docs/fax/api-reference/`} target="_blank" rel="noreferrer">Sinch Fax API Docs</Button>
798798
<Button size="small" variant="outlined" href={`https://dashboard.sinch.com/settings/access-keys`} target="_blank" rel="noreferrer">Sinch Access Keys</Button>
799799
</Box>
@@ -951,7 +951,7 @@ function SetupWizard({ client, onDone, docsBase }: SetupWizardProps) {
951951
</Box>
952952
))}
953953
<Typography variant="caption" color="text.secondary">
954-
Help: <a href={`${docsBase || 'https://docs.faxbot.net/latest'}/setup/phaxio/`} target="_blank" rel="noreferrer">Faxbot: Phaxio</a><a href={`${docsBase || 'https://docs.faxbot.net/latest'}/setup/signalwire/`} target="_blank" rel="noreferrer">Faxbot: SignalWire</a><a href={`${docsBase || 'https://docs.faxbot.net/latest'}/setup/freeswitch/`} target="_blank" rel="noreferrer">Faxbot: FreeSWITCH</a><a href="https://developers.sinch.com/docs/fax/api-reference/" target="_blank" rel="noreferrer">Sinch Fax API</a>
954+
Help: <a href={`${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/setup/phaxio/`} target="_blank" rel="noreferrer">Faxbot: Phaxio</a><a href={`${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/setup/signalwire/`} target="_blank" rel="noreferrer">Faxbot: SignalWire</a><a href={`${docsBase || 'https://docs.faxbot.net/4ee1fb94'}/setup/freeswitch/`} target="_blank" rel="noreferrer">Faxbot: FreeSWITCH</a><a href="https://developers.sinch.com/docs/fax/api-reference/" target="_blank" rel="noreferrer">Sinch Fax API</a>
955955
</Typography>
956956
</Box>
957957
)}

api/app/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ def get_admin_config():
12141214
"phaxio_verify_signature": settings.phaxio_verify_signature,
12151215
"persisted_settings_enabled": (os.getenv("ENABLE_PERSISTED_SETTINGS", "false").lower() in {"1","true","yes"}),
12161216
"branding": {
1217-
"docs_base": os.getenv("DOCS_BASE_URL", "https://docs.faxbot.net/latest"),
1217+
"docs_base": os.getenv("DOCS_BASE_URL", "https://docs.faxbot.net/4ee1fb94"),
12181218
"logo_path": "/admin/ui/faxbot_full_logo.png",
12191219
},
12201220
"migration": {
@@ -1681,7 +1681,7 @@ async def admin_ui_config(request: Request):
16811681
"auth_refresh": "/auth/refresh",
16821682
},
16831683
# client can render docs links relative to this base
1684-
"docs_base": os.getenv("DOCS_BASE_URL", "https://docs.faxbot.net/latest"),
1684+
"docs_base": os.getenv("DOCS_BASE_URL", "https://docs.faxbot.net/4ee1fb94"),
16851685
}
16861686
body = json.dumps(cfg, sort_keys=True).encode("utf-8")
16871687
etag = hashlib.sha256(body).hexdigest()

0 commit comments

Comments
 (0)