remove dynamic css theme discovery, hardcode theme list in state

Hunter
Monday, March 30th, 2026 at 10:44 AM

resources/main.js -1
resources/state.js+1-1
resources/theme.js+1-16

resources/main.js
77  	});
78  
79  	// Initialize
   -	getThemesFromCSS();
80  	setInitialTheme();
81  	renderCurrentView();
82  	selectFirstSubtask();
resources/state.js
10  	saveTimer: null,
11  	currentThemeIndex: 0,
12  	isF2Pressed: false,
   -	themes: [],
13 +	themes: ['gak', 'swamp', 'sunflower', 'harvest', 'medieval', 'woodstove', 'sugar', 'vineyard'],
14  	isInWheelEvent: false,
15  
16  	// Multi-select state
resources/theme.js
  -// Theme: theme detection, cycling, and persistence
  -
  -function getThemesFromCSS() {
  -	for (var sheet of document.styleSheets) {
  -		try {
  -			for (var rule of sheet.cssRules) {
  -				var match = rule.selectorText && rule.selectorText.match(/:root\[data-theme="([^"]+)"\]/);
  -				if (match) {
  -					state.themes.push(match[1]);
  -				}
  -			}
  -		} catch (e) {
  -			// Skip cross-origin stylesheets
  -		}
  -	}
  -}
1 +// Theme: theme selection, cycling, and persistence
2  
3  function cycleTheme() {
4  	state.currentThemeIndex = (state.currentThemeIndex + 1) % state.themes.length;