fix: logs Message column collapsing on narrow viewports + cross-platform dev:mock#134
Draft
Hazer wants to merge 3 commits into
Draft
fix: logs Message column collapsing on narrow viewports + cross-platform dev:mock#134Hazer wants to merge 3 commits into
Hazer wants to merge 3 commits into
Conversation
The log-entries table used table auto-layout with no per-column sizing, so the Message column's wrapped <pre> could be crushed down to a few characters wide on small screens. Tag the Message header/cells with .log-message-col and give them a 70ch min/width. Since the table lives in a horizontally scrollable .table-shell, this never clips content; it just guarantees a readable minimum.
The dev:mock script used `set VAR=true&&`, cmd.exe syntax that breaks on macOS/Linux (shells that don't understand `set X=Y`). Switch to Vite's first-class --mode flag: `vite --mode mock` auto-loads the new .env.mock, which sets VITE_USE_MOCK_API=true. This is OS-agnostic and requires no new dependencies. The old Windows behavior is preserved as dev:mock:win for anyone who needs it.
|
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.



Description
Two small, self-contained client-web fixes:
<pre>in the Message column down to a few characters, making the log viewer effectively unreadable on narrow viewports. Since the table is already horizontally scrollable, the column now keeps a guaranteed ~70-character minimum width.npm run dev:mocknow works on macOS/Linux. The script used cmd.exe-onlyset VITE_USE_MOCK_API=true&&syntax and failed on Unix shells. It now uses Vite's first-class--mode mockflag (auto-loads a new.env.mock), which is OS-agnostic and requires no new dependencies.Details
Logs Message column (
crates/client-web/src/app/dashboardView.ts+crates/client-web/src/style.css):Tagged the
Message<th>and its<td>cells withclass="log-message-col".Added a CSS rule pinning the column to a character-based minimum:
chunits track the0glyph width, so the column reliably holds ~70 characters regardless of viewport size. Because the table lives inside a horizontally scrollable.table-shell, this never clips content — it only stops the column from being crushed.Cross-platform
dev:mock(crates/client-web/package.json+ newcrates/client-web/.env.mock):dev:mocknow runsvite --mode mock, which makes Vite auto-load the new.env.mockfile (VITE_USE_MOCK_API=true). Theimport.meta.envreading inapi.tsis unchanged.dev:mock:winso nobody is broken.Verification
npm run check(tsc--noEmit) — ✅ passesnpm run build(vite build) — ✅ passesnpm run dev:mock— ✅ confirmed serving with"VITE_USE_MOCK_API": "true"inlined intoimport.meta.env, mock mode active, served athttp://127.0.0.1:4173/Testing instructions (mock API)
Log in with the seeded mock admin (defined in
src/mockApi.ts, browser-only — never touches the server):Then navigate to Settings → Logs and resize the window narrow to confirm the Message column stays readable (~70 chars) and the table scrolls horizontally.
Notes
lucideremains the only one).feat/initial-concept.Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage