Files
orcs-code/src/components/DevBar.tsx
Anandan 0d27ca596a Neutralize remaining internal-only diagnostic labels (#359)
This pass rewrites a small set of ant-only diagnostic and UI labels to
neutral internal wording while leaving command definitions, flags, and
runtime logic untouched. It focuses on internal debug output, dead UI
branches, and noninteractive headings rather than broader product text.

Constraint: Label cleanup only; do not change command semantics or ant-only logic gates
Rejected: Renaming ant-only command descriptions in main.tsx | broader UX surface better handled in a separate reviewed pass
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Remaining ANT-ONLY hits are mostly command descriptions and intentionally deferred user-facing strings
Tested: bun run build
Tested: bun run smoke
Tested: bun run verify:privacy
Tested: bun run test:provider
Tested: bun run test:provider-recommendation
Not-tested: Full repo typecheck (upstream baseline remains noisy)

Co-authored-by: anandh8x <test@example.com>
2026-04-04 23:50:15 +05:30

49 lines
1.2 KiB
TypeScript

import { c as _c } from "react-compiler-runtime";
import * as React from 'react';
import { useState } from 'react';
import { getSlowOperations } from '../bootstrap/state.js';
import { Text, useInterval } from '../ink.js';
// Show DevBar for dev builds or all ants
function shouldShowDevBar(): boolean {
return "production" === 'development' || "external" === 'ant';
}
export function DevBar() {
const $ = _c(5);
const [slowOps, setSlowOps] = useState(getSlowOperations);
let t0;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t0 = () => {
setSlowOps(getSlowOperations());
};
$[0] = t0;
} else {
t0 = $[0];
}
useInterval(t0, shouldShowDevBar() ? 500 : null);
if (!shouldShowDevBar() || slowOps.length === 0) {
return null;
}
let t1;
if ($[1] !== slowOps) {
t1 = slowOps.slice(-3).map(_temp).join(" \xB7 ");
$[1] = slowOps;
$[2] = t1;
} else {
t1 = $[2];
}
const recentOps = t1;
let t2;
if ($[3] !== recentOps) {
t2 = <Text wrap="truncate-end" color="warning">[internal] slow sync: {recentOps}</Text>;
$[3] = recentOps;
$[4] = t2;
} else {
t2 = $[4];
}
return t2;
}
function _temp(op) {
return `${op.operation} (${Math.round(op.durationMs)}ms)`;
}