comments and descriptions

This commit is contained in:
legop3
2026-04-28 19:39:13 -04:00
parent 07ad9ab253
commit f13b85109e
101 changed files with 303 additions and 43 deletions
@@ -1,4 +1,6 @@
// Keybinding label pill for PTT hints.
// Key Pill
// Purpose: Defines the Key Pill module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
export default function KeyPill({ label }) {
if (!label) return null;
return <span className="rounded border border-white/40 px-1 text-[0.7rem] text-white">{label}</span>;
@@ -1,4 +1,6 @@
// Compact status tile used throughout VIP audio card.
// Status Indicator
// Purpose: Defines the Status Indicator module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
export default function StatusIndicator({ label, active, detail = '' }) {
return (
<div
@@ -1,3 +1,6 @@
// Vip Audio Upload Card Content
// Purpose: Defines the Vip Audio Upload Card Content module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { fieldClass } from '../constants.js';
import { useControlSystem } from '../../../controls/index.js';
@@ -1,4 +1,6 @@
// PCM/WAV helpers for clip-mode recording payloads.
// audio Codec
// Purpose: Defines the audio Codec module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
export function mergeFloatChunks(chunks) {
const total = chunks.reduce((sum, chunk) => sum + chunk.length, 0);
const merged = new Float32Array(total);
@@ -1,4 +1,6 @@
// Base64 and auth helpers for upload and WHIP requests.
// base64
// Purpose: Defines the base64 module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
export function bytesToBase64(bytes) {
let binary = '';
const chunkSize = 0x8000;
@@ -1,4 +1,6 @@
// VIP audio upload/mic forwarding constants.
// constants
// Purpose: Defines the constants module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
export const MAX_UPLOAD_BYTES = 8 * 1024 * 1024;
export const TARGET_SAMPLE_RATE = 16000;
export const RTC_CONFIG = {
@@ -1,3 +1,6 @@
// Vip Audio Upload Card
// Purpose: Defines the Vip Audio Upload Card module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
import VipAudioUploadCardContent from './VipAudioUploadCardContent.jsx';
export default VipAudioUploadCardContent;
@@ -1,4 +1,6 @@
// WHIP/WebRTC transport helpers for microphone forwarding.
// whip Transport
// Purpose: Defines the whip Transport module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
export function waitForIceGatheringComplete(pc, timeoutMs = 1500) {
return new Promise((resolve) => {
if (!pc || pc.iceGatheringState === 'complete') {
@@ -1,3 +1,6 @@
// Vip Identity Card
// Purpose: Defines the Vip Identity Card module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
import { useState } from 'react';
import { fieldClass, flowWrapClass, innerFlowClass, maskKey } from './constants.js';
@@ -1,3 +1,6 @@
// Vip Neato Card
// Purpose: Defines the Vip Neato Card module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
import { useMemo, useState } from 'react';
function normalizeState(value) {
@@ -1,3 +1,6 @@
// Vip Private Rover Access Card
// Purpose: Defines the Vip Private Rover Access Card module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
import { useMemo, useState } from 'react';
import { flowWrapClass, innerFlowClass } from './constants.js';
@@ -1,3 +1,6 @@
// Vip Verification Card
// Purpose: Defines the Vip Verification Card module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
import { useState } from 'react';
import NicknameForm from '../NicknameForm/index.jsx';
import { flowWrapClass, innerFlowClass, fieldClass } from './constants.js';
+3
View File
@@ -1,3 +1,6 @@
// constants
// Purpose: Defines the constants module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
export const COOKIE_KEY_REGEX = /^cu_[a-f0-9]{32}$/;
export const fieldClass = 'field-input w-full max-w-sm text-left focus:ring-emerald-500';