Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion emrg/gui/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,9 @@ vision = false
const frame = await client.sendCommandAndWait("rant", {
message: message.trim().slice(0, 10000),
project: String(project || "").trim(),
timestamp: new Date().toISOString(),
// timestamp deliberately NOT sent: daemon stamps rants with local time
// (rant 2026-08-07T13:34Z — GUI previously sent new Date().toISOString(),
// which is UTC and 8h behind on UTC+8 hosts)
}, 5000);
return { ok: true, count: frame.count ?? 0 };
});
Expand Down
64 changes: 48 additions & 16 deletions emrg/gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion emrg/gui/renderer/css/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,20 @@ dialog::backdrop {
margin-bottom: var(--sp-3);
}
.dialog-card label > input,
.dialog-card label > select {
.dialog-card label > select,
.dialog-card label > textarea {
width: 100%;
margin-top: var(--sp-1);
padding: 8px 10px;
}
/* rant 2026-08-07T13:32Z: rant dialog textarea was unstyled — default box was
tiny. Full width + comfortable min-height + vertical resize + inherited font. */
.dialog-card label > textarea {
min-height: 120px;
resize: vertical;
font: inherit;
line-height: 1.5;
}
.dialog-card .hint {
font-size: var(--fs-aux);
color: var(--text-3);
Expand Down
3 changes: 2 additions & 1 deletion emrg/server/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
datefmt="%H:%M:%S",
handlers=[
RotatingFileHandler(
str(_log_file), maxBytes=10 * 1024 * 1024, backupCount=3
str(_log_file), maxBytes=10 * 1024 * 1024, backupCount=3,
encoding="utf-8", # rant 2026-08-07T14:00Z: default locale code page (GBK on zh-CN Windows) mojibakes CJK log lines
),
logging.StreamHandler(), # also to stderr (visible when run directly)
],
Expand Down
7 changes: 6 additions & 1 deletion emrg/server/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,8 +1083,13 @@ async def _process_message(

# Field order: timestamp → project → status → progress → completed → message
# (project right after timestamp per user feedback; message last)
# Timestamp is daemon-authoritative local time (rant 2026-08-07T13:34Z):
# clients previously supplied timestamps — GUI sent new Date().toISOString()
# (UTC, 8h behind on UTC+8 hosts), TUI sent naive local time. A tz-aware
# local ISO timestamp (+08:00) is self-describing, sorts correctly, and is
# consistent regardless of which client submitted the rant.
entry = {
"timestamp": msg.get("timestamp", datetime.now().isoformat()),
"timestamp": datetime.now().astimezone().isoformat(),
"project": project,
"status": "pending",
"progress": None,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_ensure_config_creates_if_missing(tmp_path, monkeypatch):
assert not config_file.exists()
ensure_config()
assert config_file.exists()
content = config_file.read_text()
content = config_file.read_text(encoding="utf-8")
assert "[llm]" in content
assert "deepseek-chat" in content

Expand All @@ -114,7 +114,7 @@ def test_ensure_config_noop_when_exists(tmp_path, monkeypatch):
config_file.write_text("custom")
monkeypatch.setattr("emrg.config.config_path", lambda: config_file)
ensure_config()
assert config_file.read_text() == "custom" # unchanged
assert config_file.read_text(encoding="utf-8") == "custom" # unchanged


def test_load_config_with_models(tmp_path, monkeypatch):
Expand Down
Loading
Loading