Add dark/light theme toggle, system prompt modal, and compress+expand session logging - #6
Merged
Merged
Conversation
… compress+expand logging Agent-Logs-Url: https://github.com/tmprabubiz/save-Token/sessions/e297b643-b636-4a88-9678-9315587e2f20 Co-authored-by: tmprabubiz <136508447+tmprabubiz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/tmprabubiz/save-Token/sessions/e297b643-b636-4a88-9678-9315587e2f20 Co-authored-by: tmprabubiz <136508447+tmprabubiz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add dark/light theme toggle functionality
Add dark/light theme toggle, system prompt modal, and compress+expand session logging
Apr 25, 2026
tmprabubiz
marked this pull request as ready for review
April 25, 2026 09:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds four features: a persistent dark/light theme toggle, a clickable 💰 icon that shows the selected model's system prompt in a copyable modal, sequential compress+expand session logging, and a
📁 Logsbutton that opens the logs folder via OS file explorer.Frontend (
style.css,index.html,app.js)[data-theme="dark"]CSS variable block;--text: #d1d5db(soft grey, not#fff) to avoid eye strainlocalStorage;<html>initialised withdata-theme="light"<div class="app-title">→<button id="app-title-btn">; click fetches/model-persona/<file>and displays it in a scrollable<pre>with one-click clipboard copy; Escape / backdrop click closesmax-height: 82vh, respects all theme variablesBackend (
app/logger.py,app/server.py,launch.py)logger.pyrewrite — replaces singlelog_entry()withlog_compress()+log_expand(), each writing to the same session file in sequence; session file created on first operation with a═══header; files namedlogs/YYYY-MM-DD/YYYY-MM-DD_HH-MM.txt;log_entry()kept as alias for backward compatibility/compressendpoint — now callssession_logger.log_compress()aftercalculate_savings()launch.py— importssession_loggerand callsreset_session()at startup before spinning up the server threadOriginal prompt
PR #5 — Dark/Light toggle, session logging, icon modal, logs folder button
1. Dark / Light theme toggle
In
frontend/style.css:Add a complete dark theme using
[data-theme="dark"]on the<html>element:Note: dark theme
--textis#d1d5db— soft grey, NOT#ffffff. This fixes "font too bright" in dark mode.In
frontend/index.html:Change
<html lang="en">to<html lang="en" data-theme="light">Add a toggle button in the topbar div, between
.app-titleand.topbar-controls:In
frontend/style.css, add:In
frontend/app.js, add at the top (after DOM references):2. 💰 icon click — opens modal with model system prompt, one-click copy
In
frontend/index.html:Change the app title div to a button:
Add modal HTML immediately after the topbar div and before the error-banner div:
In
frontend/style.css, add: