Commit Graph

3 Commits

Author SHA1 Message Date
Hermes Bot bcfd8b2eac chore(release): stamp v0.50.268 — 4-PR batch + Opus follow-ups (i18n + per-session fields + None title guard)
- CHANGELOG.md: v0.50.268 entry detailing #1395 #1450 #1462 #1476 + Opus SHOULD-FIX followups
- ROADMAP.md: bump to v0.50.268, 3800 tests collected
- TESTING.md: bump header + total to 3800

SF-1 i18n fix:
- static/i18n.js: session_meta_children key in all 10 locale blocks (en, ja, ru, es, de, zh, zh-Hant x2, pt, ko)
- static/sessions.js: 2 callsites use t(session_meta_children, childCount)

SF-2 #1462 per-session field carry-over:
- api/routes.py: duplicate now carries personality, enabled_toolsets, context_length, threshold_tokens

SF-3 #1462 None-title guard:
- api/routes.py: (session.title or "Untitled") + " (copy)"

Tests:
- tests/test_stage268_opus_followups.py: 6 regression tests pinning SF-1 + SF-2 + SF-3
- tests/test_session_duplicate.py: 2 brittle assertions widened to accept new forms

Follow-up issue filed: #1481 (PWA /sw.js whitelist vestige, Opus SF-4)
2026-05-02 17:54:58 +00:00
Hermes Bot 6303a30a87 Address review feedback: deepcopy independence, persist on duplicate, reset pinned/archived, 404 status
Five fixes from the May 2 2026 maintainer review:

1. messages and tool_calls now use copy.deepcopy() — prior plain assignment
   shared list refs between source and duplicate, so appending a turn to one
   mutated the other.
2. copied_session.save() called explicitly — pre-fix, the duplicate was
   in-memory only until the user sent a turn. Refreshing mid-flow lost it.
3. pinned and archived reset to False — duplicating an archived conversation
   should produce a visible (un-archived) copy.
4. Missing-session error is now status=404 (was default 400).
5. Removed redundant `import uuid` / `import time` inside the handler — both
   are already at the top of routes.py.

Test updates:

- Two existing static-grep tests widened to accept the new
  `copy.deepcopy(session.messages)` form alongside the original
  `messages=session.messages`.
- Five new static-grep regression tests pin each of the five fixes so
  reverting any single one trips a test.

All 3775 tests pass.

Co-authored-by: Alexey Dsov <AlexeyDsov@users.noreply.github.com>
2026-05-02 17:39:55 +00:00
AlexeyDsov 7c4c0142d5 feat(api): add /api/session/duplicate endpoint for session cloning\nNew endpoint creates independent session copies with all messages, model and workspace intact. Added 10 comprehensive regression tests for error handling and logic verification. 2026-05-02 11:59:45 +03:00