Menu

#200 refactor(coding-agent): unify session-title cleaning into one helper

closed
nobody
released (243)
2026-06-08
2026-06-08
Anonymous
No

Originally created by: Akarsh-Hegde

Summary

Maintenance finding from the PR [#198] review: the two title-stamping sites had diverged.

  • indexer::stamp_title — trimmed, dropped empty, capped at 200
  • segment::parse_session_segments — only capped

A future change to the cap or filtering rules would silently apply to only one path.

Change

Extract segment::clean_title(raw) -> Option<String> (trim → drop-if-empty → cap 200 chars, char-safe) and call it from both sites. The only behavioural change is that the Claude-JSONL path now also trims and drops blank titles (previously cap-only) — which matches the source-adapter path's existing behaviour.

Unit-tested (clean_title_trims_filters_and_caps, incl. multibyte cap safety).

Surfaced while addressing [#198]'s review; it lives in main's coding-agent code, not in [#198]'s changes, so it's split out here.

Test plan

  • [x] cargo test (clean_title + existing title tests pass)
  • [x] cargo clippy -- -D warnings, cargo fmt --check

🤖 Generated with Claude Code

Related

Tickets: #198

Discussion

  • Anonymous

    Anonymous - 2026-06-08

    Ticket changed by: Akarsh-Hegde

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2026-06-08

    Originally posted by: adityaharishch

    🎉 This PR is included in version 1.32.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

     

Log in to post a comment.