Skip to content

[Bug] Session retention hint still describes the old "Only archived sessions" checkbox #5680

Closed

Description

@sogeisetsu

Steps to reproduce

  1. Open Settings → Sessions → Session retention.
  2. Keep "Applies to" on Unarchived sessions and "When sessions expire" on Archive (both are the defaults).
  3. Hover the ⓘ next to "Applies to".

What you expected

A hint that explains the selected scope. For unarchived sessions the period counts from the session's last activity and expired sessions are archived; for archived sessions it counts from the archive time and expired sessions are deleted.

What happened instead

The hint says: "Uses Delete and counts the retention period from archiving. Unarchived sessions are kept."

That is the copy of the old "Only archived sessions" checkbox, and it contradicts all three controls on the row: the scope is Unarchived, the action is Archive, and the period runs from last activity. With "Archived sessions" selected the same sentence merely restates that mode and never explains the choice.

Where the text comes from

packages/ui/src/components/sections/openchamber/SessionRetentionSettings.tsx takes the row label from settings.layout.sessions.retention.target and the row info from settings.openchamber.sessionRetention.field.onlyArchivedDescription, unconditionally. 0e9e93d introduced that string for an "Only archived sessions" checkbox; 7bae0e7 replaced the checkbox with the two-option selector and left the string as the row's only explanation. The key still carries the checkbox name.

Suggested copy

  • Unarchived sessions: "Counts the retention period from the session's last activity. Expired sessions are archived."
  • Archived sessions: "Counts the retention period from the archive time. Expired sessions are deleted."

Related, same panel: the section tooltip lists the kept sessions as the five most recent, the open one, running and shared, but isSessionKeptByUser also keeps pinned sessions and sessions in the In work block, and neither tooltip mentions them.

Where does it happen? Desktop app (Windows)
OpenChamber version: 2.5.0

Screenshots

Session retention hint

Activity

  1. openchamber-bot commented on Oct 26, 2026

    @openchamber-bot
    Contributor

    For the maintainer: fix-ready — cause traced

    Your analysis is right, and the trace confirms the symptom exactly: the hint string you quoted matches packages/ui/src/lib/i18n/messages/en.settings.ts:1139 (onlyArchivedDescription) character for character, and it is confirmed — not just plausible — that this is what the reporter sees.

    Mechanism: SessionRetentionSettings.tsx:115 passes info={t('settings.openchamber.sessionRetention.field.onlyArchivedDescription')} to the "Applies to" SettingsFieldRow unconditionally, while the row's chip group (:117-125) freely switches between unarchived and archived. The string was written for the old "Only archived sessions" checkbox, so it both contradicts the unarchived scope and hardcodes an action ("Uses Delete") that the selector itself controls (:168 disables Delete's Archive sibling when archived is selected). The retention engine backs your suggested copy: session-retention.ts:19-21 counts from time.archived for archived scope and time.updated/created otherwise.

    What's new beyond the report:

    • The section-level tooltip already branches correctly on onlyArchived (SessionRetentionSettings.tsx:87-89) — the row hint just needs the same branch with two new keys.
    • packages/ui/src/lib/settings/search.ts:667 reuses the stale onlyArchivedDescription as the settings-search description for this item, so a fix that touches only the component leaves the stale copy in search results.
    • Your "Related" point is also confirmed: isSessionKeptByUser (session-retention.ts:35-37) keeps in-work and pinned sessions, and neither sessionRetention.tooltip nor .archivedTooltip (en.settings.ts:1140-1141) mentions them.
    • The key exists in 14 non-English locale files; new keys will need matching entries (or deliberate English fallback) in each.
    Code path
    1. SessionRetentionSettings.tsx:112-126 — "Applies to" row: label from settings.layout.sessions.retention.target, info hardcoded to onlyArchivedDescription regardless of onlyArchived state.
    2. en.settings.ts:1139 — value: "Uses Delete and counts the retention period from archiving. Unarchived sessions are kept." (checkbox-era copy from 0e9e93d; 7bae0e7 swapped the checkbox for the selector without replacing the row hint).
    3. session-retention.ts:19-27, 51-59 — scope selects the timestamp source and the archive-vs-delete path, so the two suggested hint strings are semantically accurate.
    4. search.ts:667 — same key reused as the settings-search item description.
    5. en.settings.ts:1140-1141 vs session-retention.ts:35-37 — section tooltips omit pinned and in-work sessions from the kept list.

    Suggested copy from the report works as-is; renaming the key (e.g. field.appliesToDescriptionUnarchived / ...Archived) would also retire the misleading onlyArchived name.

  2. added
    bugSomething isn't working
    area:settingsSettings UI, config, preferences
    regressionBug that worked in a previous release
    root-cause:foundBot traced a concrete code-level cause (not yet confirmed by the reporter)
    on Oct 26, 2026
  3. added a commit that references this issue on Oct 30, 2026
    bb2096a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:settingsSettings UI, config, preferencesbugSomething isn't workingregressionBug that worked in a previous releaseroot-cause:foundBot traced a concrete code-level cause (not yet confirmed by the reporter)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions