Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 78 additions & 2 deletions scripts/generate-md.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,77 @@ ${content}

// 4. Remove other self-closing component tags that we might want to strip?
// For now, let's keep others unless specific instruction, but user said "Remove everything extra".
// Let's strip standard HTML comments
processed = processed.replace(/<!--[\s\S]*?-->/g, '');
// Strip HTML and MDX comments. Both render to nothing on the site, so authors
// use them to hide unreleased features and TODOs — without this they leak into
// the .md exports and llms-full.txt and read as shipped documentation.
processed = stripComments(processed);

// 5. Clean extra empty lines created by stripping
processed = processed.replace(/\n{3,}/g, '\n\n');

return processed.trim();
}

// Remove `{/* ... */}` and `<!-- ... -->` comments, including multi-line ones,
// while leaving fenced code blocks untouched. Snippets legitimately contain both
// — an AndroidManifest example, a JSX sample — and those must survive verbatim.
export function stripComments(content) {
const PAIRS = [['{/*', '*/}'], ['<!--', '-->']];
const lines = content.split('\n');
const out = [];
let inFence = false;
let closer = null;

for (const line of lines) {
if (/^\s*(```|~~~)/.test(line)) {
inFence = !inFence;
out.push(line);
continue;
}
if (inFence) {
out.push(line);
continue;
}

let rest = line;
let kept = '';

// Finish a comment that opened on an earlier line.
if (closer) {
const end = rest.indexOf(closer);
if (end === -1) continue;
rest = rest.slice(end + closer.length);
closer = null;
}

// Consume every comment that opens on this line.
for (;;) {
let next = null;
for (const [open, close] of PAIRS) {
const at = rest.indexOf(open);
if (at !== -1 && (next === null || at < next.at)) next = { at, open, close };
}
if (!next) {
kept += rest;
break;
}
kept += rest.slice(0, next.at);
const after = rest.slice(next.at + next.open.length);
const end = after.indexOf(next.close);
if (end === -1) {
closer = next.close;
break;
}
rest = after.slice(end + next.close.length);
}

// Drop lines that were nothing but a comment; keep genuine blank lines.
if (kept.trim() || !line.trim()) out.push(kept.trimEnd());
}

return out.join('\n');
}

function cleanFrontmatter(content) {
const frontmatterRegex = /^---\s*\n([\s\S]*?)\n---\s*\n/;
const match = content.match(frontmatterRegex);
Expand All @@ -202,6 +264,13 @@ function cleanFrontmatter(content) {
return content.replace(frontmatterRegex, `---\n${keptLines.join('\n')}\n---\n\n`);
}

// Mirrors the check in generate-platform-llms-full.mjs.
function isDraft(content) {
const match = content.match(/^---\s*\n([\s\S]*?)\n---/);
if (!match) return false;
return /^draft:\s*true\s*$/m.test(match[1]);
}

async function processFiles(dir, reusableComponents, englishFiles) {
const entries = await fs.readdir(dir, { withFileTypes: true });

Expand All @@ -213,6 +282,11 @@ async function processFiles(dir, reusableComponents, englishFiles) {
} else if (entry.isFile() && (entry.name.endsWith('.md') || entry.name.endsWith('.mdx'))) {
const rawContent = await fs.readFile(fullPath, 'utf-8');

// `draft: true` pages are skipped by the site router, so they must not
// get a .md export either — otherwise the content stays fetchable at
// /docs/<slug>.md even though the page itself 404s.
if (isDraft(rawContent)) continue;

// Clean Frontmatter
let content = cleanFrontmatter(rawContent);

Expand Down Expand Up @@ -257,6 +331,8 @@ async function processLocaleFiles(locale, baseComponents, englishFiles) {
if (!entry.isFile() || (!entry.name.endsWith('.md') && !entry.name.endsWith('.mdx'))) continue;

const rawContent = await fs.readFile(path.join(localeDir, entry.name), 'utf-8');
if (isDraft(rawContent)) continue;

let content = cleanFrontmatter(rawContent);
content = stripContent(content, components);

Expand Down
8 changes: 6 additions & 2 deletions scripts/generate-platform-llms-full.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { stripComments } from './generate-md.mjs';
import fs from 'node:fs/promises';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
Expand Down Expand Up @@ -92,6 +93,10 @@ async function getLocaleReusableComponents(baseComponents, locale) {
function stripContent(content, reusableComponents) {
let processed = content;

// 0. Remove MDX/HTML comments before anything else, so hidden unreleased
// features and TODOs never reach the LLM bundles.
processed = stripComments(processed);

// 1. Remove imports
processed = processed.replace(/^import\s+.*?;?\s*$/gm, '');

Expand All @@ -115,8 +120,7 @@ function stripContent(content, reusableComponents) {
processed = processed.replace(regex, componentContent);
}

// 4. Remove HTML comments
processed = processed.replace(/<!--[\s\S]*?-->/g, '');
// 4. HTML comments are already gone — stripComments() handled them in step 0.

// 5. Clean extra empty lines
processed = processed.replace(/\n{3,}/g, '\n\n');
Expand Down
1 change: 1 addition & 0 deletions src/assets/Inline/_gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ <h1>Inline Icon Gallery</h1>
<div class="card" data-copy="<Inline id=&quot;redo.svg&quot; alt=&quot;Redo&quot; />"><div class="icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M2.66675 13.3333V12.4C2.66675 10.1598 2.66675 9.03967 3.10272 8.18403C3.48622 7.43138 4.09814 6.81946 4.85079 6.43596C5.70643 5.99999 6.82654 5.99999 9.06675 5.99999H13.3334M13.3334 5.99999L10.0001 9.33332M13.3334 5.99999L10.0001 2.66666" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg></div><div class="name">redo.svg</div></div>
<div class="card" data-copy="<Inline id=&quot;refresh.svg&quot; alt=&quot;Refresh&quot; />"><div class="icon"><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18.3333 8.33333C18.3333 8.33333 16.6625 6.05685 15.3051 4.69854C13.9478 3.34022 12.072 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5C13.4192 17.5 16.3041 15.2119 17.2069 12.0833M18.3333 8.33333V3.33333M18.3333 8.33333H13.3333" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="name">refresh.svg</div></div>
<div class="card" data-copy="<Inline id=&quot;remote-config.svg&quot; alt=&quot;Remote Config&quot; />"><div class="icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.3335 11.3333L14.6668 8L11.3335 4.66667M4.66683 4.66667L1.3335 8L4.66683 11.3333M9.3335 2L6.66683 14" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="name">remote-config.svg</div></div>
<div class="card" data-copy="<Inline id=&quot;restore.svg&quot; alt=&quot;Restore&quot; />"><div class="icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.65056 3.75924C9.06989 3.39982 9.11845 2.76852 8.75903 2.3492C8.39961 1.92987 7.76831 1.88131 7.34898 2.24073L4.29188 4.8611C3.59346 5.45975 3.59346 6.54023 4.29188 7.13887L7.34898 9.75924C7.76831 10.1187 8.39961 10.0701 8.75903 9.65078C9.11845 9.23145 9.06989 8.60015 8.65056 8.24073L7.20303 6.99999H11.9998C15.3135 6.99999 17.9998 9.68628 17.9998 13C17.9998 16.3137 15.3135 19 11.9998 19C8.68606 19 5.99977 16.3137 5.99977 13H3.99977C3.99977 17.4183 7.58149 21 11.9998 21C16.418 21 19.9998 17.4183 19.9998 13C19.9998 8.58171 16.418 4.99999 11.9998 4.99999H7.20303L8.65056 3.75924Z" fill="currentColor"></path></svg></div><div class="name">restore.svg</div></div>
<div class="card" data-copy="<Inline id=&quot;send-to-device.svg&quot; alt=&quot;Send To Device&quot; />"><div class="icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.03067 3.26068L6.31442 2.7038V2.7038L6.03067 3.26068ZM5.73933 2.96934L6.29621 2.68559V2.68559L5.73933 2.96934ZM9.594 2.96934L9.03713 2.68559L9.03713 2.68559L9.594 2.96934ZM9.30266 3.26068L9.01892 2.7038L9.01892 2.7038L9.30266 3.26068ZM5.13333 15.2917C5.47851 15.2917 5.75833 15.0119 5.75833 14.6667C5.75833 14.3215 5.47851 14.0417 5.13333 14.0417V14.6667V15.2917ZM3.72801 14.5213L3.44427 15.0782L3.44427 15.0782L3.72801 14.5213ZM3.14532 13.9387L2.58845 14.2224L2.58845 14.2224L3.14532 13.9387ZM11.6053 1.47867L11.8891 0.921789V0.921789L11.6053 1.47867ZM12.188 2.06136L11.6311 2.3451V2.3451L12.188 2.06136ZM3.72801 1.47867L4.01176 2.03555L4.01176 2.03555L3.72801 1.47867ZM3.14532 2.06136L3.7022 2.3451V2.3451L3.14532 2.06136ZM11.7083 4.67649C11.7083 5.02167 11.9882 5.30149 12.3333 5.30149C12.6785 5.30149 12.9583 5.02167 12.9583 4.67649H12.3333H11.7083ZM8.66107 14.3741L9.00775 14.8941V14.8941L8.66107 14.3741ZM7.97346 14.7243L7.93621 15.3482L7.97346 14.7243ZM7.6455 14.5488L8.14394 14.1717L7.6455 14.5488ZM13.3346 10.075L12.988 10.595V10.595L13.3346 10.075ZM13.8315 10.4964L13.2542 10.7358L13.8315 10.4964ZM13.3346 11.2584L12.988 10.7383H12.988L13.3346 11.2584ZM13.8315 10.8369L13.2542 10.5975L13.8315 10.8369ZM8.66107 6.95928L9.00775 6.43925V6.43925L8.66107 6.95928ZM7.97346 6.60903L7.93621 5.98514L7.97346 6.60903ZM7.6455 6.78455L8.14394 7.16162L7.6455 6.78455ZM9.66667 1.33334H9.04167V2.26668H9.66667H10.2917V1.33334H9.66667ZM8.6 3.33334V2.70834H6.73333V3.33334V3.95834H8.6V3.33334ZM5.66667 2.26668H6.29167V1.33334H5.66667H5.04167V2.26668H5.66667ZM6.73333 3.33334V2.70834C6.53634 2.70834 6.42618 2.70786 6.34636 2.70134C6.27385 2.69541 6.28293 2.68776 6.31442 2.7038L6.03067 3.26068L5.74693 3.81756C5.92103 3.90627 6.09475 3.93494 6.24457 3.94718C6.3871 3.95883 6.55696 3.95834 6.73333 3.95834V3.33334ZM5.66667 2.26668H5.04167C5.04167 2.44305 5.04118 2.61291 5.05283 2.75544C5.06507 2.90526 5.09374 3.07898 5.18245 3.25308L5.73933 2.96934L6.29621 2.68559C6.31225 2.71708 6.3046 2.72616 6.29867 2.65365C6.29215 2.57383 6.29167 2.46367 6.29167 2.26668H5.66667ZM6.03067 3.26068L6.31442 2.7038C6.30658 2.69981 6.3002 2.69343 6.29621 2.68559L5.73933 2.96934L5.18245 3.25308C5.30629 3.49612 5.50389 3.69372 5.74693 3.81756L6.03067 3.26068ZM9.66667 2.26668H9.04167C9.04167 2.46367 9.04118 2.57383 9.03466 2.65365C9.02874 2.72616 9.02108 2.71708 9.03713 2.68559L9.594 2.96934L10.1509 3.25308C10.2396 3.07898 10.2683 2.90526 10.2805 2.75544C10.2922 2.61291 10.2917 2.44305 10.2917 2.26668H9.66667ZM8.6 3.33334V3.95834C8.77637 3.95834 8.94624 3.95883 9.08876 3.94718C9.23858 3.93494 9.41231 3.90627 9.58641 3.81756L9.30266 3.26068L9.01892 2.7038C9.05041 2.68776 9.05949 2.69541 8.98697 2.70134C8.90716 2.70786 8.797 2.70834 8.6 2.70834V3.33334ZM9.594 2.96934L9.03713 2.68559C9.03313 2.69343 9.02676 2.69981 9.01892 2.7038L9.30266 3.26068L9.58641 3.81756C9.82945 3.69372 10.027 3.49612 10.1509 3.25308L9.594 2.96934ZM5.13333 1.33334V1.95834H5.66667V1.33334V0.708344H5.13333V1.33334ZM5.66667 1.33334V1.95834H9.66667V1.33334V0.708344H5.66667V1.33334ZM9.66667 1.33334V1.95834H10.2V1.33334V0.708344H9.66667V1.33334ZM3 12.5333H3.625V3.46668H3H2.375V12.5333H3ZM5.13333 14.6667V14.0417C4.74965 14.0417 4.49948 14.0412 4.3085 14.0256C4.12481 14.0106 4.05157 13.9848 4.01176 13.9645L3.72801 14.5213L3.44427 15.0782C3.68967 15.2033 3.94572 15.2501 4.20671 15.2714C4.4604 15.2922 4.77028 15.2917 5.13333 15.2917V14.6667ZM3 12.5333H2.375C2.375 12.8964 2.37451 13.2063 2.39524 13.46C2.41656 13.721 2.46341 13.977 2.58845 14.2224L3.14532 13.9387L3.7022 13.6549C3.68192 13.6151 3.6561 13.5419 3.64109 13.3582C3.62549 13.1672 3.625 12.917 3.625 12.5333H3ZM3.72801 14.5213L4.01176 13.9645C3.87847 13.8966 3.77011 13.7882 3.7022 13.6549L3.14532 13.9387L2.58845 14.2224C2.7762 14.5909 3.07579 14.8905 3.44427 15.0782L3.72801 14.5213ZM10.2 1.33334V1.95834C10.5837 1.95834 10.8339 1.95883 11.0248 1.97443C11.2085 1.98944 11.2818 2.01526 11.3216 2.03555L11.6053 1.47867L11.8891 0.921789C11.6437 0.796751 11.3876 0.749908 11.1266 0.728585C10.8729 0.707857 10.5631 0.708344 10.2 0.708344V1.33334ZM12.3333 3.46668H12.9583C12.9583 3.10362 12.9588 2.79374 12.9381 2.54005C12.9168 2.27906 12.8699 2.02301 12.7449 1.77761L12.188 2.06136L11.6311 2.3451C11.6514 2.38492 11.6772 2.45816 11.6922 2.64184C11.7078 2.83282 11.7083 3.083 11.7083 3.46668H12.3333ZM11.6053 1.47867L11.3216 2.03555C11.4549 2.10346 11.5632 2.21182 11.6311 2.3451L12.188 2.06136L12.7449 1.77761C12.5571 1.40913 12.2575 1.10954 11.8891 0.921789L11.6053 1.47867ZM5.13333 1.33334V0.708344C4.77028 0.708344 4.4604 0.707857 4.20671 0.728585C3.94572 0.749908 3.68967 0.796751 3.44427 0.921789L3.72801 1.47867L4.01176 2.03555C4.05157 2.01526 4.12481 1.98944 4.3085 1.97443C4.49948 1.95883 4.74965 1.95834 5.13333 1.95834V1.33334ZM3 3.46668H3.625C3.625 3.083 3.62549 2.83282 3.64109 2.64184C3.6561 2.45816 3.68192 2.38492 3.7022 2.3451L3.14532 2.06136L2.58845 1.77761C2.46341 2.02301 2.41656 2.27906 2.39524 2.54005C2.37451 2.79374 2.375 3.10362 2.375 3.46668H3ZM3.72801 1.47867L3.44427 0.921789C3.07578 1.10954 2.7762 1.40913 2.58845 1.77761L3.14532 2.06136L3.7022 2.3451C3.77011 2.21182 3.87848 2.10346 4.01176 2.03555L3.72801 1.47867ZM12.3333 3.46668H11.7083V4.67649H12.3333H12.9583V3.46668H12.3333ZM8.66107 6.95928L8.31438 7.47931L12.988 10.595L13.3346 10.075L13.6813 9.55497L9.00775 6.43925L8.66107 6.95928ZM13.3346 11.2584L12.988 10.7383L8.31438 13.8541L8.66107 14.3741L9.00775 14.8941L13.6813 11.7784L13.3346 11.2584ZM7.5555 13.7824H8.1805V7.55096H7.5555H6.9305V13.7824H7.5555ZM8.66107 14.3741L8.31438 13.8541C8.12448 13.9807 8.01785 14.051 7.94063 14.0928C7.85784 14.1377 7.90463 14.0941 8.01071 14.1004L7.97346 14.7243L7.93621 15.3482C8.19119 15.3634 8.40221 15.2644 8.53622 15.1918C8.67579 15.1162 8.83852 15.0069 9.00775 14.8941L8.66107 14.3741ZM7.5555 13.7824H6.9305C6.9305 13.9858 6.92987 14.1818 6.94436 14.3399C6.95827 14.4917 6.99294 14.7222 7.14705 14.9259L7.6455 14.5488L8.14394 14.1717C8.20806 14.2565 8.19774 14.3196 8.18914 14.2258C8.18113 14.1384 8.1805 14.0106 8.1805 13.7824H7.5555ZM7.97346 14.7243L8.01071 14.1004C8.06341 14.1036 8.11209 14.1296 8.14394 14.1717L7.6455 14.5488L7.14705 14.9259C7.33571 15.1753 7.62406 15.3296 7.93621 15.3482L7.97346 14.7243ZM13.3346 10.075L12.988 10.595C13.0635 10.6454 13.1235 10.6854 13.1747 10.7208C13.226 10.7563 13.2597 10.7812 13.2826 10.7996C13.3349 10.8418 13.2881 10.8178 13.2542 10.7358L13.8315 10.4964L14.4088 10.257C14.3231 10.0504 14.1763 9.91456 14.0673 9.82664C13.9593 9.73955 13.8197 9.64723 13.6813 9.55497L13.3346 10.075ZM13.3346 11.2584L13.6813 11.7784C13.8197 11.6861 13.9593 11.5938 14.0673 11.5067C14.1763 11.4188 14.3231 11.283 14.4088 11.0764L13.8315 10.8369L13.2542 10.5975C13.2881 10.5156 13.3349 10.4915 13.2826 10.5337C13.2597 10.5522 13.226 10.577 13.1747 10.6126C13.1235 10.6479 13.0635 10.688 12.988 10.7383L13.3346 11.2584ZM13.8315 10.4964L13.2542 10.7358C13.2358 10.6916 13.2358 10.6418 13.2542 10.5975L13.8315 10.8369L14.4088 11.0764C14.5176 10.8141 14.5176 10.5193 14.4088 10.257L13.8315 10.4964ZM8.66107 6.95928L9.00775 6.43925C8.83852 6.32642 8.67579 6.21718 8.53622 6.14154C8.40221 6.06892 8.19119 5.96992 7.93621 5.98514L7.97346 6.60903L8.01071 7.23292C7.90463 7.23925 7.85784 7.19566 7.94063 7.24053C8.01785 7.28238 8.12448 7.35271 8.31438 7.47931L8.66107 6.95928ZM7.5555 7.55096H8.1805C8.1805 7.32273 8.18113 7.19499 8.18914 7.10753C8.19774 7.01376 8.20806 7.07686 8.14394 7.16162L7.6455 6.78455L7.14705 6.40748C6.99294 6.6112 6.95827 6.8417 6.94436 6.99348C6.92987 7.15157 6.9305 7.34756 6.9305 7.55096H7.5555ZM7.97346 6.60903L7.93621 5.98514C7.62406 6.00378 7.33571 6.1581 7.14705 6.40748L7.6455 6.78455L8.14394 7.16162C8.11209 7.20372 8.06341 7.22977 8.01071 7.23292L7.97346 6.60903Z" fill="currentColor"/></svg></div><div class="name">send-to-device.svg</div></div>
<div class="card" data-copy="<Inline id=&quot;settings.svg&quot; alt=&quot;Settings&quot; />"><div class="icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2 5.33337L10 5.33337M10 5.33337C10 6.43794 10.8954 7.33337 12 7.33337C13.1046 7.33337 14 6.43794 14 5.33337C14 4.2288 13.1046 3.33337 12 3.33337C10.8954 3.33337 10 4.22881 10 5.33337ZM6 10.6667L14 10.6667M6 10.6667C6 11.7713 5.10457 12.6667 4 12.6667C2.89543 12.6667 2 11.7713 2 10.6667C2 9.56214 2.89543 8.66671 4 8.66671C5.10457 8.66671 6 9.56214 6 10.6667Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="name">settings.svg</div></div>
<div class="card" data-copy="<Inline id=&quot;strikethrough.svg&quot; alt=&quot;Strikethrough&quot; />"><div class="icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10.6667C4 12.1394 5.19391 13.3334 6.66667 13.3334H9.33333C10.8061 13.3334 12 12.1394 12 10.6667C12 9.19393 10.8061 8.00002 9.33333 8.00002M12 5.33335C12 3.86059 10.8061 2.66669 9.33333 2.66669H6.66667C5.19391 2.66669 4 3.86059 4 5.33335M2 8.00002H14" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="name">strikethrough.svg</div></div>
Expand Down
1 change: 1 addition & 0 deletions src/assets/Inline/restore.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/shared/img/back-to-active-flow.webp

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сейчас ок, но на будущее: давай, пожалуйста, для консистентности использовать не затемнение для выделения, а фиолетовую обводку как везде у нас

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/shared/img/flow-copy-archive.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/shared/img/flow-list.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions src/content/docs/guides/flow-builder/archive-flows.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: "Archive flows"
description: "Archive the flows you no longer need, and keep their metrics."
metadataTitle: "Archive flows | Flows | Adapty Docs"
---

Archive a flow you stopped using to keep the **Flows** list focused. Archived flows sort to the bottom, and you can filter them out by status. Their metrics stay intact.

:::warning
An archived flow can't be restored, edited, or [copied](copy-flows). Do not archive the flows you may need in the future.
:::

<ZoomImage id="flow-copy-archive.webp" width="700px" alt="Archive in the context menu of a flow's row" />

## Archive a flow

Find the flow in the [**Flows**](https://app.adapty.io/flows) list. Open the context menu <Inline id="context.svg" alt="Context menu" /> and select **Archive**.

:::warning
Don't archive a live flow.
:::

Before you archive the flow:
- Remove it from every [placement](placements).
- Archive any [A/B tests](ab-tests) that still use it.

Archived flows stay in the **Flows** list with an **Archived** status. To hide them, [filter the list by status](filter-flows#filter-by-status) and leave **Archived** unselected.
Loading
Loading