Apply a “configuration as a contract” standard: when behavior depends on environment/profile/feature flags (remote vs local, active management profile, accessibility mode, client/server timing), wire that configuration into all relevant code paths and keep its semantics consistent across layers.
Checklist
screenReaderMode) is required for a user-facing terminal, ensure equivalent terminal variants (e.g., agent/output terminals with independent constructors) receive the same option.Example patterns
// In api.ts / shared config
PROFILE_SCOPED_PREFIXES.add('/api/messaging/weixin/onboarding')
// so fetchJSON can append the active management profile
// In both terminal constructors
const termOptions = { /* ... */ screenReaderMode: true }
// Ensure client timeout constants/comments reflect the server’s real cap
export const PROFILES_REQUEST_TIMEOUT_MS = SERVER_CAP_MS // or remove misleading comments