feat: sidebar scroll + log persistente (v1.11.1)

- Sidebar diventata troppo lunga (14+ tab): overflow-y auto sulla nav,
  brand e footer restano sticky. Scrollbar 6px tema-coerente
- Nuovo core/applog.py: TimedRotatingFileHandler daily con 7 giorni
  di retention. NON tocca sys.stdout/stderr (causa segfault WebKit
  su macOS); cattura tracebacks via sys.excepthook + threading.excepthook
- bridge._log mirror su logger persistente (ui.<view>) → tutto quello
  che vedi nei log delle tab e' anche su file
- Bridge: get_log_file_path() + open_log_folder() per la nuova sezione
  Impostazioni con path visibile e bottone "Apri cartella"
This commit is contained in:
luciano committed 2026-08-27 11:27:57 +02:00
1 parent cdbb1d85d5
commit ed1059bf8c
8 files changed
+228 -1

No files matched your search

+13
View File
@@ -151,6 +151,9 @@ button, input, select, textarea { font-family: inherit; font-size: inherit; }
flex-direction: column;
padding: 24px 12px;
border-right: 1px solid var(--border);
height: 100vh;
min-height: 0; /* consente ai flex children di rimpicciolirsi sotto il contenuto */
overflow: hidden;
}
.brand {
@@ -192,7 +195,17 @@ button, input, select, textarea { font-family: inherit; font-size: inherit; }
flex-direction: column;
gap: 2px;
flex: 1;
min-height: 0; /* per far funzionare overflow su flex child */
overflow-y: auto; /* scrolla se ci sono troppi tab e la finestra è corta */
overflow-x: hidden;
scrollbar-width: thin;
}
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb {
background: var(--bg-input);
border-radius: 3px;
}
.nav::-webkit-scrollbar-thumb:hover { background: var(--bg-input-hover); }
.nav-item {
display: flex;
+18
View File
@@ -598,6 +598,24 @@
</div>
</div>
<h2 class="section-label">Log</h2>
<div class="card">
<div class="field">
<label class="field-label">Cartella dei log</label>
<div class="row">
<div class="path-display" id="logPathDisplay" style="flex:1;">—</div>
<button class="btn btn-ghost pill btn-sm" id="openLogFolderBtn">📁 Apri cartella</button>
</div>
<div class="hint">
<span class="hint-ico">ⓘ</span>
<div>
L'app scrive un log giornaliero (<code>app.log</code>) con rotazione automatica (7 giorni).
Utile per debug: incluide stdout, stderr, log delle tab e traceback.
</div>
</div>
</div>
</div>
<h2 class="section-label">Aspetto</h2>
<div class="card">
<div class="field">
+15
View File
@@ -490,6 +490,12 @@ async function init() {
if ($("#cookiesBrowserSelect")) $("#cookiesBrowserSelect").value = state.config.cookies_browser || "";
$("#outputInput").value = state.config.output_dir || "";
$("#themeSelect").value = state.config.theme || "dark";
// Popola path del log corrente
if ($("#logPathDisplay")) {
window.pywebview.api.get_log_file_path().then((p) => {
if (p) $("#logPathDisplay").textContent = p;
}).catch(() => {});
}
applyTheme(state.config.theme);
// Download tab — usa output_dir come default
@@ -1284,6 +1290,15 @@ $("#browseCookiesBtn").addEventListener("click", async () => {
if (path) $("#cookiesInput").value = path;
});
$("#openLogFolderBtn")?.addEventListener("click", async () => {
try {
const r = await window.pywebview.api.open_log_folder();
if (!r || !r.ok) toast("Impossibile aprire la cartella: " + (r?.error || "errore"), "error");
} catch (e) {
toast("Errore: " + e, "error");
}
});
$("#browseOutputBtn").addEventListener("click", async () => {
const path = await window.pywebview.api.browse_directory();
if (path) $("#outputInput").value = path;