Skip to content

Adding opencode+kiloCLI support#1

Closed
lirrensi wants to merge 1 commit into
vakovalskii:mainfrom
lirrensi:main
Closed

Adding opencode+kiloCLI support#1
lirrensi wants to merge 1 commit into
vakovalskii:mainfrom
lirrensi:main

Conversation

@lirrensi
Copy link
Copy Markdown

@lirrensi lirrensi commented Apr 3, 2026

This however required node bump to 24 to have sqlite, and first discovery is slower...

@vakovalskii
Copy link
Copy Markdown
Owner

Code review

Found 6 issues:

  1. Broken projectKey regex — Claude sessions won't resolve on disk. The original code uses .replace(/[\/\.]/g, '-') to encode project paths (replacing both / and .). The PR reverts this to .replace(/\//g, '-').replace(/^-/, ''), dropping dot replacement. Any project path with dots in the username (e.g. v.kovalskii) will produce a wrong key and fs.existsSync will return false silently.

https://github.com/vakovalskii/codedash/blob/34707850ce543480cdf823d5af47d0ab3c52b6f9/src/data.js#L158-L162

  1. Search index deleted — O(N x disk) regression. The existing in-memory search index (buildSearchIndex, getSearchIndex, INDEX_TTL=60s) is completely removed. searchFullText now calls loadSessionDetail on every session for every query. With hundreds of sessions this will be extremely slow on every keystroke debounce.

https://github.com/vakovalskii/codedash/blob/34707850ce543480cdf823d5af47d0ab3c52b6f9/src/data.js#L1580-L1620

  1. getSessionReplay and getCostAnalytics not exported. Both functions exist in the file but are missing from the new module.exports block, breaking the /api/replay/:id and /api/analytics/cost endpoints with a runtime error.

https://github.com/vakovalskii/codedash/blob/34707850ce543480cdf823d5af47d0ab3c52b6f9/src/data.js#L1639-L1656

  1. deleteOpenCodeSessionFromDb always reports success. Returns ['session record'] even if the DELETE matched zero rows. The existing Claude delete path checks filtered.length < lines.length before reporting. This silently lies to the user.

https://github.com/vakovalskii/codedash/blob/34707850ce543480cdf823d5af47d0ab3c52b6f9/src/data.js#L1490-L1510

  1. Node >= 24 requirement is too aggressive. Bumping from Node >= 16 to >= 24 for node:sqlite will break most users. Consider using better-sqlite3 as an optional dependency, or lazy-loading with a graceful fallback when SQLite is unavailable.

https://github.com/vakovalskii/codedash/blob/34707850ce543480cdf823d5af47d0ab3c52b6f9/package.json#L19-L21

  1. inferOpenCodeTool ignores version parameter — Kilo sessions from shared DB always labelled as opencode. The function accepts version but never uses it. loadOpenCodeSessionsFromDb calls it with sourceHint = 'opencode' only, so Kilo sessions in the shared opencode.db will be misclassified.

https://github.com/vakovalskii/codedash/blob/34707850ce543480cdf823d5af47d0ab3c52b6f9/src/data.js#L45-L49


Summary: The OpenCode/Kilo support is a great addition, but there are regressions that need fixing before merge: the projectKey encoding will break existing Claude session lookup, the search index removal is a major perf regression, and two API functions are silently unexported.

Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@lirrensi
Copy link
Copy Markdown
Author

lirrensi commented Apr 4, 2026

Updated the fork to current upstream and re-applied the intended fork-specific feature set.
What changed:

  • Added first-class OpenCode and Kilo session support across data loading, detail/replay/export, search, and delete flows
  • Updated the UI/CLI to recognize and label claude, codex, opencode, and kilo sessions
  • Preserved existing Claude/Codex behavior while keeping the project-path/session lookup logic intact
  • Kept the MicroPatch spec in the repo so the feature can be re-applied cleanly on future upstream updates
    Note:
  • This branch requires the newer Node runtime because of the SQLite-backed OpenCode support

@ABIvan-Tech
Copy link
Copy Markdown
Contributor

@vakovalskii Thank you. I apologize for the long wait.

@ABIvan-Tech
Copy link
Copy Markdown
Contributor

@vakovalskii could you also update READEME?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants