Skip to content

Self-improving AI Employees for everyone

refactor(theme): drop the removed themes' sound packs and fonts

trohitgd4b793733f89
diff --git a/client/eslint.config.js b/client/eslint.config.js
index d4f824ad..92970567 100644
--- a/client/eslint.config.js
+++ b/client/eslint.config.js
@@ -61,7 +61,7 @@ export default tseslint.config(
ignores: [
// Grandfathered: legacy JS-side palettes and SVG glyph assets that
// legitimately hold literal values (canvas/maps color packs, brand
- // icons, 290 themed glyphs). New code goes through theme tokens.
+ // icons, Atomic's themed glyphs). New code goes through theme tokens.
'src/styles/theme.ts',
'src/hooks/useAppTheme.ts',
'src/components/icons/**',
diff --git a/client/index.html b/client/index.html
index d2887483..866f4f78 100644
--- a/client/index.html
+++ b/client/index.html
@@ -36,32 +36,27 @@
</script>
<!--
Theme typography. Each theme picks its display + body + mono via
- the --font-display / --font-body / --font-mono tokens. Loading
- these as `media="print" onload=...` defers the network cost so
- the default light/dark theme (system fonts via @fontsource-
- variable/geist bundled at build time) renders without blocking,
- and Renaissance + Cyber fonts swap in once their stylesheets land.
+ the --font-display / --font-body / --font-mono tokens. Light and
+ dark use Geist (@fontsource-variable/geist, bundled at build time)
+ and the system mono. Loading Atomic's fonts as `media="print"
+ onload=...` defers the network cost, so light and dark render
+ without blocking and Atomic's fonts swap in once their stylesheet
+ lands.
- Renaissance: Cinzel (display), Cormorant Garamond (body),
- IM Fell English (mono / italic accents).
- Cyber: Space Mono (display — design-handoff legibility
- substitution for Major Mono Display), VT323 (body
- fallback), JetBrains Mono (body + mono).
- Plague: Cinzel (display — substitution for UnifrakturCook
- blackletter), EB Garamond (body), Special Elite (mono).
+ Atomic: Bevan (display), Lato (body), Space Mono (mono).
-->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="stylesheet"
- href="https://fonts.googleapis.com/css2?family=Anonymous+Pro:ital,wght@0,400;0,700;1,400&family=Bevan&family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&family=IM+Fell+English+SC&family=IM+Fell+English:ital@0;1&family=JetBrains+Mono:wght@400;500;600;700&family=Lato:wght@400;700&family=Pirata+One&family=Sawarabi+Mincho&family=Shippori+Mincho:wght@400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Special+Elite&family=VT323&display=swap"
+ href="https://fonts.googleapis.com/css2?family=Bevan&family=Lato:wght@400;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap"
media="print"
onload="this.media='all'"
/>
<noscript>
<link
rel="stylesheet"
- href="https://fonts.googleapis.com/css2?family=Anonymous+Pro:ital,wght@0,400;0,700;1,400&family=Bevan&family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&family=IM+Fell+English+SC&family=IM+Fell+English:ital@0;1&family=JetBrains+Mono:wght@400;500;600;700&family=Lato:wght@400;700&family=Pirata+One&family=Sawarabi+Mincho&family=Shippori+Mincho:wght@400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Special+Elite&family=VT323&display=swap"
+ href="https://fonts.googleapis.com/css2?family=Bevan&family=Lato:wght@400;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap"
/>
</noscript>
<title>OpenCompany</title>
diff --git a/client/src/components/ui/SettingsPanel.tsx b/client/src/components/ui/SettingsPanel.tsx
index a57c42d6..51216464 100644
--- a/client/src/components/ui/SettingsPanel.tsx
+++ b/client/src/components/ui/SettingsPanel.tsx
@@ -432,7 +432,7 @@ const SettingsPanel: React.FC<SettingsPanelProps> = ({
<Section title="Audio" Icon={Volume2} tone="tool">
<Row
label="Sound Effects"
- description="Play per-theme click / hover / save / error sounds. Each theme ships a different pack (parchment, terminal, marble, ink, clockwork, ...). Enabled by default — toggle off if you prefer silence."
+ description="Play per-theme click / hover / save / error sounds. Each theme has its own pack (parchment for Light, terminal for Dark, vibraphone for Atomic). Enabled by default — toggle off if you prefer silence."
>
<Switch
checked={soundEnabled}
diff --git a/client/src/hooks/useSound.ts b/client/src/hooks/useSound.ts
index 4bca999f..7ef9a66d 100644
--- a/client/src/hooks/useSound.ts
+++ b/client/src/hooks/useSound.ts
@@ -32,10 +32,7 @@ import { useTheme } from '../contexts/ThemeContext';
import { useAppStore } from '../store/useAppStore';
import { Sounds, type SoundPackName, type SoundEvent } from '../lib/sound';
-const VALID_PACKS: ReadonlySet<SoundPackName> = new Set([
- 'none', 'parchment', 'marble', 'ink', 'clockwork', 'vibraphone',
- 'terminal', 'scrap', 'crypt', 'bell', 'telex',
-]);
+const VALID_PACKS: ReadonlySet<SoundPackName> = new Set(['none', 'parchment', 'vibraphone', 'terminal']);
/** Selector for the global hover delegate. Mirrors the upstream
* `app/sound.js` auto-capture list, modulo class additions from W15
diff --git a/client/src/lib/sound.ts b/client/src/lib/sound.ts
index 819ce1aa..e9fdf9ec 100644
--- a/client/src/lib/sound.ts
+++ b/client/src/lib/sound.ts
@@ -36,15 +36,8 @@ export type SoundEvent =
export type SoundPackName =
| 'none'
| 'parchment'
- | 'marble'
- | 'ink'
- | 'clockwork'
| 'vibraphone'
- | 'terminal'
- | 'scrap'
- | 'crypt'
- | 'bell'
- | 'telex';
+ | 'terminal';
interface OscConfig {
type: OscillatorType;
@@ -88,7 +81,7 @@ let activePack: EventTable = {};
* Uses `performance.now()` for monotonic timing. The 30 ms window
* matches the upstream `app/sound.js` reference engine's documented
* hover debounce; we apply the same to `type` since each oscillator
- * costs ~25 ms decay on the parchment / marble packs.
+ * costs ~25 ms decay on the parchment pack.
*/
const lastFireMs: Partial<Record<SoundEvent, number>> = {};
const THROTTLE_MS: Partial<Record<SoundEvent, number>> = {
@@ -158,42 +151,6 @@ const PARCHMENT: EventTable = {
modalClose: { type: 'sine', freq: 392, dur: 0.14, vol: 0.06, attack: 0.005, decay: 0.14, sweep: 0.7 },
};
-const MARBLE: EventTable = {
- click: { type: 'sine', freq: 330, dur: 0.05, vol: 0.07, attack: 0.001, decay: 0.05 },
- hover: { type: 'sine', freq: 520, dur: 0.02, vol: 0.025, attack: 0.001, decay: 0.02 },
- type: { type: 'triangle', freq: 260, dur: 0.03, vol: 0.04, attack: 0.001, decay: 0.03, lp: 1200 },
- success: { type: 'sine', freq: 392, dur: 0.5, vol: 0.09, attack: 0.005, decay: 0.5, sweep: 1.6 },
- error: { type: 'sawtooth', freq: 130, dur: 0.30, vol: 0.10, attack: 0.005, decay: 0.30, lp: 500 },
- run: { type: 'sine', freq: 440, dur: 0.22, vol: 0.10, attack: 0.005, decay: 0.22, sweep: 1.4 },
- save: { type: 'sine', freq: 330, dur: 0.35, vol: 0.10, attack: 0.01, decay: 0.35 },
- modalOpen: { type: 'sine', freq: 392, dur: 0.20, vol: 0.07, attack: 0.02, decay: 0.20, sweep: 1.3 },
- modalClose: { type: 'sine', freq: 392, dur: 0.16, vol: 0.06, attack: 0.005, decay: 0.16, sweep: 0.7 },
-};
-
-const INK: EventTable = {
- click: { type: 'triangle', freq: 280, dur: 0.05, vol: 0.05, attack: 0.005, decay: 0.05, lp: 1500 },
- hover: { type: 'sine', freq: 440, dur: 0.018, vol: 0.02, attack: 0.001, decay: 0.018 },
- type: { type: 'sine', freq: 220, dur: 0.04, vol: 0.04, attack: 0.005, decay: 0.04, lp: 600 },
- success: { type: 'sine', freq: 660, dur: 1.2, vol: 0.08, attack: 0.01, decay: 1.2 },
- error: { type: 'triangle', freq: 174, dur: 0.4, vol: 0.08, attack: 0.005, decay: 0.4, lp: 800 },
- run: { type: 'sine', freq: 523, dur: 0.6, vol: 0.08, attack: 0.02, decay: 0.6 },
- save: { type: 'sine', freq: 440, dur: 0.8, vol: 0.10, attack: 0.01, decay: 0.8 },
- modalOpen: { type: 'sine', freq: 523, dur: 0.4, vol: 0.06, attack: 0.04, decay: 0.4 },
- modalClose: { type: 'sine', freq: 392, dur: 0.4, vol: 0.05, attack: 0.005, decay: 0.4 },
-};
-
-const CLOCKWORK: EventTable = {
- click: { type: 'square', freq: 800, dur: 0.04, vol: 0.06, attack: 0.001, decay: 0.04, lp: 2200 },
- hover: { type: 'square', freq: 1100, dur: 0.012, vol: 0.02, attack: 0.001, decay: 0.012 },
- type: { type: 'square', freq: 600, dur: 0.025, vol: 0.05, attack: 0.001, decay: 0.025, lp: 1800 },
- success: { type: 'sawtooth', freq: 523, dur: 0.5, vol: 0.08, attack: 0.005, decay: 0.5, sweep: 1.5, lp: 2500 },
- error: { type: 'sawtooth', freq: 196, dur: 0.35, vol: 0.10, attack: 0.005, decay: 0.35, lp: 700 },
- run: { type: 'square', freq: 440, dur: 0.30, vol: 0.10, attack: 0.005, decay: 0.30, sweep: 1.4, lp: 2000 },
- save: { type: 'triangle', freq: 660, dur: 0.45, vol: 0.10, attack: 0.01, decay: 0.45, lp: 2400 },
- modalOpen: { type: 'square', freq: 392, dur: 0.18, vol: 0.07, attack: 0.005, decay: 0.18, sweep: 1.3, lp: 1800 },
- modalClose: { type: 'square', freq: 392, dur: 0.14, vol: 0.06, attack: 0.005, decay: 0.14, sweep: 0.65, lp: 1400 },
-};
-
const VIBRAPHONE: EventTable = {
click: { type: 'triangle', freq: 880, dur: 0.10, vol: 0.06, attack: 0.001, decay: 0.10 },
hover: { type: 'triangle', freq: 1320, dur: 0.05, vol: 0.025, attack: 0.001, decay: 0.05 },
@@ -218,66 +175,11 @@ const TERMINAL: EventTable = {
modalClose: { type: 'square', freq: 1175, dur: 0.06, vol: 0.06, attack: 0.001, decay: 0.06, sweep: 0.6 },
};
-const SCRAP: EventTable = {
- click: { type: 'sawtooth', freq: 180, dur: 0.05, vol: 0.07, attack: 0.0005, decay: 0.05, lp: 1400 },
- hover: { type: 'sawtooth', freq: 320, dur: 0.012, vol: 0.025, attack: 0.0005, decay: 0.012, lp: 2000 },
- type: { type: 'square', freq: 140, dur: 0.03, vol: 0.05, attack: 0.0005, decay: 0.03, lp: 800 },
- success: { type: 'sawtooth', freq: 440, dur: 0.18, vol: 0.10, attack: 0.001, decay: 0.18, sweep: 1.3, lp: 1600 },
- error: { type: 'sawtooth', freq: 90, dur: 0.5, vol: 0.12, attack: 0.001, decay: 0.5, lp: 400 },
- run: { type: 'square', freq: 220, dur: 0.20, vol: 0.10, attack: 0.001, decay: 0.20, sweep: 1.2, lp: 1200 },
- save: { type: 'sawtooth', freq: 330, dur: 0.18, vol: 0.10, attack: 0.001, decay: 0.18, lp: 1400 },
- modalOpen: { type: 'sawtooth', freq: 196, dur: 0.10, vol: 0.07, attack: 0.001, decay: 0.10, lp: 1000 },
- modalClose: { type: 'sawtooth', freq: 196, dur: 0.08, vol: 0.06, attack: 0.001, decay: 0.08, sweep: 0.5, lp: 700 },
-};
-
-const CRYPT: EventTable = {
- click: { type: 'sine', freq: 220, dur: 0.08, vol: 0.06, attack: 0.005, decay: 0.08, lp: 600 },
- hover: { type: 'sine', freq: 330, dur: 0.025, vol: 0.02, attack: 0.005, decay: 0.025, lp: 800 },
- type: { type: 'sine', freq: 165, dur: 0.04, vol: 0.04, attack: 0.005, decay: 0.04, lp: 400 },
- success: { type: 'triangle', freq: 261, dur: 0.8, vol: 0.08, attack: 0.02, decay: 0.8, sweep: 1.5, lp: 1200 },
- error: { type: 'sawtooth', freq: 73, dur: 0.6, vol: 0.10, attack: 0.01, decay: 0.6, lp: 300 },
- run: { type: 'sine', freq: 196, dur: 0.45, vol: 0.10, attack: 0.02, decay: 0.45, sweep: 1.3, lp: 800 },
- save: { type: 'sine', freq: 174, dur: 0.7, vol: 0.10, attack: 0.05, decay: 0.7, lp: 700 },
- modalOpen: { type: 'sine', freq: 220, dur: 0.5, vol: 0.07, attack: 0.05, decay: 0.5, lp: 600 },
- modalClose: { type: 'sine', freq: 220, dur: 0.4, vol: 0.06, attack: 0.005, decay: 0.4, sweep: 0.6, lp: 500 },
-};
-
-const BELL: EventTable = {
- click: { type: 'triangle', freq: 392, dur: 0.10, vol: 0.06, attack: 0.001, decay: 0.10, lp: 1500 },
- hover: { type: 'sine', freq: 660, dur: 0.025, vol: 0.025, attack: 0.001, decay: 0.025 },
- type: { type: 'square', freq: 220, dur: 0.025, vol: 0.04, attack: 0.001, decay: 0.025, lp: 800 },
- success: { type: 'triangle', freq: 523, dur: 1.0, vol: 0.09, attack: 0.001, decay: 1.0 },
- error: { type: 'sawtooth', freq: 110, dur: 0.6, vol: 0.10, attack: 0.005, decay: 0.6, lp: 500 },
- run: { type: 'triangle', freq: 440, dur: 0.6, vol: 0.10, attack: 0.001, decay: 0.6 },
- save: { type: 'triangle', freq: 392, dur: 0.9, vol: 0.10, attack: 0.001, decay: 0.9 },
- modalOpen: { type: 'triangle', freq: 523, dur: 0.4, vol: 0.07, attack: 0.001, decay: 0.4 },
- modalClose: { type: 'triangle', freq: 392, dur: 0.4, vol: 0.06, attack: 0.001, decay: 0.4 },
-};
-
-const TELEX: EventTable = {
- click: { type: 'square', freq: 1500, dur: 0.012, vol: 0.07, attack: 0.0005, decay: 0.012 },
- hover: { type: 'square', freq: 2200, dur: 0.006, vol: 0.02, attack: 0.0005, decay: 0.006 },
- type: { type: 'square', freq: 1100, dur: 0.010, vol: 0.05, attack: 0.0005, decay: 0.010 },
- success: { type: 'square', freq: 1318, dur: 0.10, vol: 0.08, attack: 0.0005, decay: 0.10 },
- error: { type: 'sawtooth', freq: 220, dur: 0.4, vol: 0.12, attack: 0.0005, decay: 0.4 },
- run: { type: 'square', freq: 1760, dur: 0.06, vol: 0.10, attack: 0.0005, decay: 0.06 },
- save: { type: 'square', freq: 1175, dur: 0.08, vol: 0.08, attack: 0.0005, decay: 0.08 },
- modalOpen: { type: 'square', freq: 988, dur: 0.05, vol: 0.07, attack: 0.0005, decay: 0.05 },
- modalClose: { type: 'square', freq: 988, dur: 0.04, vol: 0.06, attack: 0.0005, decay: 0.04, sweep: 0.6 },
-};
-
const PACKS: Record<SoundPackName, EventTable> = {
none: {},
parchment: PARCHMENT,
- marble: MARBLE,
- ink: INK,
- clockwork: CLOCKWORK,
vibraphone: VIBRAPHONE,
terminal: TERMINAL,
- scrap: SCRAP,
- crypt: CRYPT,
- bell: BELL,
- telex: TELEX,
};
// ── Public API ───────────────────────────────────────────────────────────