refactor: remove redundant comments and docstrings (#6527)
* refactor: remove redundant comments and docstrings * fix(signal): annotate async context manager as a generator
This commit is contained in:
1 parent
cb3ba45317
commit
a4d2430140
922 files changed
+406
-7738
No files matched your search
@@ -8,7 +8,6 @@ import { HostSwitcherView } from "./HostSwitcherView";
|
||||
export { HostNavigationContext, type HostPicker } from "./host-navigation";
|
||||
export { RemoteHostMenu } from "./HostSwitcherView";
|
||||
|
||||
/** Connect the sidebar's presentation to the active host and client. */
|
||||
export function HostSwitcher({ collapsed = false, portalContainer }: { collapsed?: boolean; portalContainer?: HTMLElement | null }) {
|
||||
const picker = useContext(HostNavigationContext);
|
||||
const { client } = useClient();
|
||||
|
||||
@@ -5,7 +5,6 @@ import { remoteAction } from "@/lib/remote-instances";
|
||||
import { useRemoteConnections } from "./remote-context";
|
||||
import { PairRouteSettingsView } from "./PairRouteSettingsView";
|
||||
|
||||
/** An explicit escape hatch for a VPN/bound-interface route, not a new SSH form. */
|
||||
export function PairRouteSettings({ id, onSaved, showHint = true }: { id: string; onSaved?: () => void; showHint?: boolean }) {
|
||||
const { t } = useTranslation();
|
||||
const { client } = useClient();
|
||||
|
||||
@@ -34,7 +34,6 @@ export function QuickPairSetup({ returned, active = true, onSSH, onClose }: { re
|
||||
|
||||
useEffect(() => {
|
||||
if (!pending) { setBusyVisible(false); return; }
|
||||
// Fast local preparation should not flash a loading label or move the dialog.
|
||||
const timer = window.setTimeout(() => setBusyVisible(true), 200);
|
||||
return () => window.clearTimeout(timer);
|
||||
}, [pending]);
|
||||
|
||||
@@ -167,7 +167,6 @@ export function QuickPairSetupView({
|
||||
</div>;
|
||||
}
|
||||
|
||||
/** Decorative overview, not a live connection-status indicator. */
|
||||
function RemoteConnectionIllustration() {
|
||||
return <svg viewBox="0 0 208 88" width="184" height="78" aria-hidden="true" focusable="false" className="mx-auto mb-4 shrink-0 text-foreground/70" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="M78 51 C111 65 114 28 146 36" className="text-muted-foreground/50" strokeWidth="2.5" />
|
||||
|
||||
@@ -26,7 +26,6 @@ const emptyProfile = (): Omit<RemoteProfile, "id" | "connected"> => ({
|
||||
config_path: "~/.nanobot/config.json", runtime_user: "",
|
||||
});
|
||||
|
||||
/** The page is a server directory. Add/edit/first-use verification share one dialog. */
|
||||
export function RemoteConnectionsPage({ mainNavigationExpanded = false, hostChromeInset = false, onBackToChat }: {
|
||||
mainNavigationExpanded?: boolean;
|
||||
hostChromeInset?: boolean;
|
||||
|
||||
@@ -9,7 +9,6 @@ type SSHHostPickerProps = Pick<SSHHostPickerViewProps,
|
||||
configFile: string;
|
||||
};
|
||||
|
||||
/** One address field for both manual entry and existing SSH aliases. */
|
||||
export function SSHHostPicker({ configFile, suggestions = true, ...props }: SSHHostPickerProps) {
|
||||
const { t } = useTranslation();
|
||||
const { client } = useClient();
|
||||
@@ -47,7 +46,6 @@ export function SSHHostPicker({ configFile, suggestions = true, ...props }: SSHH
|
||||
const unsubscribe = client.onStatus((status) => {
|
||||
if (status === "open" && !started) {
|
||||
started = true;
|
||||
// Custom paths update quietly after typing; no separate "read config" flow.
|
||||
timer = setTimeout(() => { void load(file); }, file ? 300 : 0);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* Remote dialogs share typography and action sizing without changing app-wide controls. */
|
||||
.remote-dialog {
|
||||
min-inline-size: 0;
|
||||
max-block-size: min(85dvh, calc(100dvh - 2rem));
|
||||
@@ -46,7 +45,6 @@
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
}
|
||||
|
||||
/* Keep secondary actions readable when translations need a second line. */
|
||||
.remote-pair-alternatives {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
|
||||
Reference in new issue
Block a user