Marcus Castro
456bd58740
fix(paths): structurally resolve home dir to prevent Windows path bugs ( #12125 )
...
* fix(paths): structurally resolve home dir to prevent Windows path bugs
Extract resolveRawHomeDir as a private function and gate the public
resolveEffectiveHomeDir through a single path.resolve() exit point.
This makes it structurally impossible for unresolved paths (missing
drive letter on Windows) to escape the function, regardless of how
many return paths exist in the raw lookup logic.
Simplify resolveRequiredHomeDir to only resolve the process.cwd()
fallback, since resolveEffectiveHomeDir now returns resolved values.
Fix shortenMeta in tool-meta.ts: the colon-based split for file:line
patterns (e.g. file.txt:12) conflicts with Windows drive letters
(C:\...) because indexOf(":") matches the drive colon first.
shortenHomeInString already handles file:line patterns correctly via
split/join, so the colon split was both unnecessary and harmful.
Update test assertions across all affected files to use path.resolve()
in expected values and input strings so they match the now-correct
resolved output on both Unix and Windows.
Fixes #12119
* fix(changelog): add paths Windows fix entry (#12125 )
---------
Co-authored-by: Sebastian <19554889+sebslight@users.noreply.github.com>
2026-02-08 20:06:29 -05:00
Seb Slight
db137dd65d
fix(paths): respect OPENCLAW_HOME for all internal path resolution ( #12091 )
...
* fix(paths): respect OPENCLAW_HOME for all internal path resolution (#11995 )
Add home-dir module (src/infra/home-dir.ts) that centralizes home
directory resolution with precedence: OPENCLAW_HOME > HOME > USERPROFILE > os.homedir().
Migrate all path-sensitive callsites: config IO, agent dirs, session
transcripts, pairing store, cron store, doctor, CLI profiles.
Add envHomedir() helper in config/paths.ts to reduce lambda noise.
Document OPENCLAW_HOME in docs/help/environment.md.
* fix(paths): handle OPENCLAW_HOME '~' fallback (#12091 ) (thanks @sebslight)
* docs: mention OPENCLAW_HOME in install and getting started (#12091 ) (thanks @sebslight)
* fix(status): show OPENCLAW_HOME in shortened paths (#12091 ) (thanks @sebslight)
* docs(changelog): clarify OPENCLAW_HOME and HOME precedence (#12091 ) (thanks @sebslight)
2026-02-08 16:20:13 -05:00
Tak Hoffman
82419eaad6
Web UI: show Compaction divider in chat history ( #11341 )
2026-02-07 12:37:22 -06:00
Tak Hoffman
8a352c8f9d
Web UI: add token usage dashboard ( #10072 )
...
* feat(ui): Token Usage dashboard with session analytics
Adds a comprehensive Token Usage view to the dashboard:
Backend:
- Extended session-cost-usage.ts with per-session daily breakdown
- Added date range filtering (startMs/endMs) to API endpoints
- New sessions.usage, sessions.usage.timeseries, sessions.usage.logs endpoints
- Cost breakdown by token type (input/output/cache read/write)
Frontend:
- Two-column layout: Daily chart + breakdown | Sessions list
- Interactive daily bar chart with click-to-filter and shift-click range select
- Session detail panel with usage timeline, conversation logs, context weight
- Filter chips for active day/session selections
- Toggle between tokens/cost view modes (default: cost)
- Responsive design for smaller screens
UX improvements:
- 21-day default date range
- Debounced date input (400ms)
- Session list shows filtered totals when days selected
- Context weight breakdown shows skills, tools, files contribution
* fix(ui): restore gatewayUrl validation and syncUrlWithSessionKey signature
- Restore normalizeGatewayUrl() to validate ws:/wss: protocol
- Restore isTopLevelWindow() guard for iframe security
- Revert syncUrlWithSessionKey signature (host param was unused)
* feat(ui): Token Usage dashboard with session analytics
Adds a comprehensive Token Usage view to the dashboard:
Backend:
- Extended session-cost-usage.ts with per-session daily breakdown
- Added date range filtering (startMs/endMs) to API endpoints
- New sessions.usage, sessions.usage.timeseries, sessions.usage.logs endpoints
- Cost breakdown by token type (input/output/cache read/write)
Frontend:
- Two-column layout: Daily chart + breakdown | Sessions list
- Interactive daily bar chart with click-to-filter and shift-click range select
- Session detail panel with usage timeline, conversation logs, context weight
- Filter chips for active day/session selections
- Toggle between tokens/cost view modes (default: cost)
- Responsive design for smaller screens
UX improvements:
- 21-day default date range
- Debounced date input (400ms)
- Session list shows filtered totals when days selected
- Context weight breakdown shows skills, tools, files contribution
* fix: usage dashboard data + cost handling (#8462 ) (thanks @mcinteerj)
* Usage: enrich metrics dashboard
* Usage: add latency + model trends
* Gateway: improve usage log parsing
* UI: add usage query helpers
* UI: client-side usage filter + debounce
* Build: harden write-cli-compat timing
* UI: add conversation log filters
* UI: fix usage dashboard lint + state
* Web UI: default usage dates to local day
* Protocol: sync session usage params (#8462 ) (thanks @mcinteerj, @TakHoffman)
---------
Co-authored-by: Jake McInteer <mcinteerj@gmail.com>
2026-02-05 22:35:46 -06:00
Peter Steinberger
9a7160786a
refactor: rename to openclaw
2026-01-30 03:16:21 +01:00
Peter Steinberger
6d16a658e5
refactor: rename clawdbot to moltbot with legacy compat
2026-01-27 12:21:02 +00:00
Peter Steinberger
cadaf2c835
feat: add sessions preview rpc and menu prewarm
2026-01-22 10:21:50 +00:00
Peter Steinberger
faa5838147
fix: polish session picker filtering ( #1271 ) (thanks @Whoaa512)
2026-01-20 16:46:15 +00:00
CJ Winslow
36719690a2
test: add coverage for readLastMessagePreviewFromTranscript
...
Also add CHANGELOG entry and perf docs for session list flags.
2026-01-20 16:37:09 +00:00
CJ Winslow
83d5e30027
feat: add heuristic session title derivation for session picker
...
Enable meaningful session titles via priority-based derivation:
1. displayName (user-set)
2. subject (group name)
3. First user message (truncated to 60 chars)
4. sessionId prefix + date fallback
Opt-in via includeDerivedTitles param to avoid perf impact on
regular listing. Reads only first 10 lines of transcript files.
Closes #1161
2026-01-20 16:36:51 +00:00