I built a proper settings webview panel for Tab Rot because asking users to edit raw JSON for threhold values felt hostile. Made a settingsPanel.ts that opens a dedicated webview tab with a clean form — three number inputs for the decay thresholds (stage 1, 2, 3 in minute), three toggle switches for decorations, status bar, and notifications. The whole thing uses VS Code’s CSS variables so it automatically matches the user’s theme — dark mode, light mode, high contrast, whatever. It looks native.The panel is a singleton — if you already have it open, running the command again just focuses the existing panel instead of spawning duplicates. The HTML is inline because it’s small enough that a separate file feels like overkill, but it’s structured with proper labels, hints explaining what each value means, and a little visual preview of the three decay stages as colored badges. The toggles are custom CSS switches that feels nicer than raw checkboxes.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.