Skip to content

Commit 6db9e7b

Browse files
JavaZerooclaude
andcommitted
feat: sidebar re-architecture — settings modal, smooth collapse, compact parsing
Settings modal (Ctrl+,): - Long-lived configuration moved out of the sidebar into a dedicated modal with vertical tabs (Performance / Baseline / Experimental). Fixed height (h-[640px] max-h-[85vh]) so switching tabs no longer reflows the dialog. - Experimental tab gates Anomaly detection and Annotations behind opt-in toggles — both default off so first-time users see a focused, lightweight sidebar. Toggling re-introduces the respective panels and chart overlays. - Danger zone at the bottom houses Reset, which used to be a red pill in the header. Includes an explanation and auto-closes the modal on click. Sidebar layout: - Header card compressed from 4 rows to 2: brand + close on row 1, language toggle + GitHub icon + theme + settings + help on row 2. Intro paragraph and 'Online' badge removed. - Width bumped to 22rem (was 20rem) to give the title room to breathe. - Sidebar show/hide animates grid-template-columns alongside the chart area using cubic-bezier(0.4, 0, 0.2, 1) so layout settles in one motion. Show button cross-fades with a 200ms delay to avoid overlap. - All collapsible cards animate height via a SmoothCollapse wrapper (grid-template-rows: 0fr ↔ 1fr trick); display options tabs fade between. Parsing controls (RegexControls): - Per-metric rows reduced from ~8 lines to 2: 'Name' + name input + mode select + delete on row 1, 'Pattern' + value input on row 2. Inline text labels replace the verbose section headers; placeholders show concrete examples (e.g. Loss / loss:). - Preset dropdown extracted into a single 'From preset…' selector next to Add Metric — picking inserts a pre-filled row. - Step keyword inlined to one row; X/Y range condensed to one row each with a tabular-nums input and inline reset; feature description block deleted. - Presets: added 'Per Step Time' (per_step_time:), removed 'Accuracy'. Chart defaults: - Downsampling now defaults off. Small logs render every point; users can opt in via Settings → Performance when investigating large runs. Tests updated for the new Reset location (Settings → Experimental → Danger). 118 passing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent a043e52 commit 6db9e7b

14 files changed

Lines changed: 773 additions & 434 deletions

public/locales/en/translation.json

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,16 @@
126126
"regex.keywordHint": "Supports fuzzy match, e.g., \"loss\" matches \"training_loss\"",
127127
"regex.regex": "Regular Expression",
128128
"regex.regexHint": "Use capture groups () to extract numbers",
129-
"regex.dataParsing": "Data Parsing Config",
129+
"regex.dataParsing": "Data Parsing",
130+
"regex.labelName": "Name",
131+
"regex.labelPattern": "Pattern",
132+
"regex.metricNamePlaceholder": "e.g. Loss",
133+
"regex.modeShortKw": "Keyword",
134+
"regex.modeShortRgx": "Regex",
135+
"regex.keywordPlaceholder": "e.g. loss:",
136+
"regex.regexPlaceholder": "e.g. loss:\\s*([\\d.eE+-]+)",
137+
"regex.fromPreset": "From preset…",
138+
"regex.rangeHint": "Hold <0>Shift</0> + drag on the chart to zoom.",
130139
"regex.smartRecommend": "Smart recommend best config",
131140
"regex.previewMatches": "Preview matches",
132141
"regex.deleteConfig": "Remove config",
@@ -174,6 +183,25 @@
174183
"configModal.example3": "Start: 0, End: empty → shows all data points (default)",
175184
"configModal.cancel": "Cancel",
176185
"configModal.save": "Save Config",
186+
"settings.title": "Settings",
187+
"settings.aria": "Open settings",
188+
"settings.close": "Close settings",
189+
"settings.tabParsing": "Parsing",
190+
"settings.tabPerformance": "Performance",
191+
"settings.tabBaseline": "Baseline",
192+
"settings.tabExperimental": "Experimental",
193+
"settings.experimentalHint": "These features are still being tuned. Enable to opt in — they may change or move in future releases.",
194+
"settings.experimentalAnomaliesDesc": "Automatically detect NaN, gradient explosions, statistical spikes, and training plateaus. Adds an Anomalies panel to the sidebar and red markers on charts.",
195+
"settings.experimentalAnnotationsDesc": "Mark specific steps on every chart (e.g. checkpoint saved, LR decay). Adds an Annotations panel to the sidebar.",
196+
"settings.dangerZone": "Danger zone",
197+
"settings.resetDesc": "Clears all uploaded files, parsing configuration, and display preferences. This cannot be undone.",
198+
"settings.resetButton": "Reset",
199+
"settings.parsingHint": "Configure how log files are parsed. Changes here re-run the parser on all loaded files.",
200+
"settings.performanceHint": "Tune rendering performance when working with large logs.",
201+
"settings.baselineHint": "Threshold lines drawn on comparison charts for absolute / relative errors.",
202+
"settings.footerHint": "These settings are saved and persist across sessions.",
203+
"display.openSettings": "More settings…",
204+
"shortcuts.openSettings": "Open settings",
177205
"anomalies.title": "Anomalies",
178206
"anomalies.empty": "No anomalies detected.",
179207
"anomalies.hint": "Detected: non-finite values, sudden 5× jumps, 4σ spikes vs prior 30 points, and ≥50-step plateaus.",

public/locales/zh/translation.json

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,16 @@
126126
"regex.keywordHint": "支持模糊匹配,如 \"loss\" 可匹配 \"training_loss\"",
127127
"regex.regex": "正则表达式",
128128
"regex.regexHint": "使用捕获组 () 来提取数值",
129-
"regex.dataParsing": "数据解析配置",
129+
"regex.dataParsing": "数据解析",
130+
"regex.labelName": "指标名称",
131+
"regex.labelPattern": "匹配公式",
132+
"regex.metricNamePlaceholder": "如 Loss",
133+
"regex.modeShortKw": "关键词",
134+
"regex.modeShortRgx": "正则",
135+
"regex.keywordPlaceholder": "例如 loss:",
136+
"regex.regexPlaceholder": "例如 loss:\\s*([\\d.eE+-]+)",
137+
"regex.fromPreset": "从预设添加…",
138+
"regex.rangeHint": "按住 <0>Shift</0> + 在图上拖动可缩放。",
130139
"regex.smartRecommend": "智能推荐最佳配置",
131140
"regex.previewMatches": "预览匹配结果",
132141
"regex.deleteConfig": "删除配置",
@@ -174,6 +183,25 @@
174183
"configModal.example3": "起始: 0, 结束: 留空 → 显示全部数据点(默认)",
175184
"configModal.cancel": "取消",
176185
"configModal.save": "保存配置",
186+
"settings.title": "设置",
187+
"settings.aria": "打开设置",
188+
"settings.close": "关闭设置",
189+
"settings.tabParsing": "数据解析",
190+
"settings.tabPerformance": "性能",
191+
"settings.tabBaseline": "基准线",
192+
"settings.tabExperimental": "实验性",
193+
"settings.experimentalHint": "这些功能仍在调优中。启用即表示愿意尝试——未来版本中它们可能会变化或迁移。",
194+
"settings.experimentalAnomaliesDesc": "自动检测 NaN、梯度爆炸、统计异常点和训练停滞。启用后侧栏多一个异常检测面板,图表上叠加红色标记。",
195+
"settings.experimentalAnnotationsDesc": "在每个图表的特定 step 上画一条标注线(例如 checkpoint saved、LR decay)。启用后侧栏多一个标注面板。",
196+
"settings.dangerZone": "危险操作",
197+
"settings.resetDesc": "清除所有已上传的文件、解析配置和显示偏好。此操作不可撤销。",
198+
"settings.resetButton": "重置",
199+
"settings.parsingHint": "配置日志文件的解析方式。修改后会对所有已加载文件重新解析。",
200+
"settings.performanceHint": "在处理大日志时调优渲染性能。",
201+
"settings.baselineHint": "对比图上绘制的绝对/相对误差阈值线。",
202+
"settings.footerHint": "这些设置会持久化保存到本地。",
203+
"display.openSettings": "更多设置…",
204+
"shortcuts.openSettings": "打开设置",
177205
"anomalies.title": "异常检测",
178206
"anomalies.empty": "未检测到异常。",
179207
"anomalies.hint": "自动检测:非有限值、相邻 5× 突增、4σ 离群点、连续 50+ 步无变化。",

0 commit comments

Comments
 (0)