Skip to content

Add refresh to re-scan on-disk history (host CLIs + currently-running WSL distros)#344

Merged
DDKinger merged 5 commits into
mainfrom
dev/yuazha/session-mgmt-esc-restore
Jun 24, 2026
Merged

Add refresh to re-scan on-disk history (host CLIs + currently-running WSL distros)#344
DDKinger merged 5 commits into
mainfrom
dev/yuazha/session-mgmt-esc-restore

Conversation

@DDKinger

@DDKinger DDKinger commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Adds F5 to refresh the session list — re-scans on-disk history so sessions from a WSL distro that wasn't running at startup show up once it's running.
image

What

  • Adds F5 to refresh in the WTA session-management (Agents) view. F5 asks master to re-scan the on-disk historical session logs (host CLIs + currently-running WSL distros) — the same scan run at startup — and re-list, so sessions that appeared after launch (e.g. a WSL distro started after IT booted, or a CLI session run in another shell) show up without restarting.
  • The footer hint gains • F5 to refresh, localized across all 89 locales.
  • During a refresh the list shows the loading shimmer, and the result is broadcast so every open session view (all windows/tabs) refreshes together.

How

F5 footer hint + localization

  • app.rs: F5 in the Agents view triggers a refetch (schedule_agents_refetch_for_tab).
  • locales: append the translated • F5 <refresh> segment to agents.footer_hint and add F5 to the {Locked} key-name list across all 89 locales. Translations follow each locale's existing "Esc " style and the Microsoft term for "Refresh"; RTL and the three pseudo-locales keep their wrappers; am-ET / lo-LA keep their English placeholder.

F5 = master re-scan (not just a cached re-list)

  • Thread a rescan flag helper->master on sessions/list. F5 sets a sticky pending_rescan (survives in-flight coalescing); the helper forwards it; master, on rescan, runs history_loader::load_for_cli off the LocalSet (spawn_blocking), upserts into the registry, then answers. Normal 5s polls / view-open / wta sessions list stay snapshot-only; a legacy empty {} params object deserializes as rescan=false.
  • The rescan adds, never replaces: it upserts via SessionRegistry::upsert_if_absent, so a reloaded disk row (status Historical, no pane binding) can't clobber a live session already in the registry — an open session keeps its status / pane binding across F5. Titles for existing rows still refresh via the post-rescan try_refresh_title_from_disk_with pass. (The startup seed uses the same guard.)
  • After a successful rescan master broadcasts sessions/changed, so every open view refetches immediately (matching the startup scan) instead of waiting up to 5s. The triggered refetches are rescan=false → they neither re-scan disk nor re-broadcast (no loop).
  • A rescan_in_flight flag drives the loading shimmer for the whole refresh, so F5 has visible feedback even when the list already has rows; a normal poll keeps it false and never flashes.

WSL: filter by CLI before parsing

  • load_all_in now takes a cli_filter and reuses cli_scan_flags (the host path's dispatch) to parse only the selected CLI's transcripts out of the extracted distro mirror. Previously all four CLIs were parsed and the others discarded via retain_wsl_cli (now removed). The fetch/tar/extract is unchanged (still fetches all four), so this saves parse cost only; behavior is preserved (None / custom agents still scan all four).

Tests

  • f5_in_session_view_refetches_sessions — F5 -> rescan=true, view-open -> rescan=false.
  • agents_view_loading_shows_during_f5_rescan — shimmer shows during a rescan even with rows present.
  • build_sessions_list_request_round_trips_rescan — wire round-trip + legacy {} backward-compat.
  • scan_distro_with_cli_filter_parses_only_selected_cli — parse-time WSL CLI filter.
  • upsert_if_absent_preserves_existing_row_and_adds_new — a rescan can't downgrade a live row to Historical or drop its pane binding, and still adds genuinely new sessions.
  • Full WTA suite green (989 passed); YAML compiles via rust-i18n.

Add an F5 keybinding in the WTA session-management (Agents) view that
refetches the session list, and surface it in the footer hint.

- app.rs: F5 in the Agents view calls schedule_agents_refetch_for_tab
  (no-ops when the view isn't primed and coalesces with an in-flight
  fetch). Adds a unit test asserting F5 dispatches a sessions/list request.
- locales: append the "F5 <refresh>" segment to agents.footer_hint and add
  "F5" to the {Locked} key-name list across all 89 locales. Translations
  follow each locale's existing "Esc <exit>" style and the Microsoft term
  for "Refresh". RTL and the three pseudo-locales keep their wrappers (the
  segment is inserted before the closing paren); am-ET / lo-LA keep the
  English placeholder their footer_hint currently uses.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 23, 2026 13:38
@DDKinger DDKinger changed the title Add "F5 to refresh" to session management view Add refresh to session management view Jun 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an F5 refresh affordance to the WTA session-management (Agents) TUI view so users can manually refetch the session list, and updates the localized footer hint accordingly across all locales.

Changes:

  • Handle KeyCode::F(5) in the Agents view by calling schedule_agents_refetch_for_tab.
  • Add a unit test ensuring F5 dispatches a sessions/list request.
  • Update agents.footer_hint (and its {Locked=...} key list) across all locale YAMLs to include “F5 to refresh” in each language’s existing style.

Reviewed changes

Copilot reviewed 90 out of 90 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/wta/src/app.rs Add F5 handling for Agents view refresh + a unit test asserting SessionsList is dispatched.
tools/wta/locales/af-ZA.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/am-ET.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ar-SA.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/as-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/az-Latn-AZ.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/bg-BG.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/bn-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/bs-Latn-BA.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ca-Es-VALENCIA.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ca-ES.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/cs-CZ.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/cy-GB.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/da-DK.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/de-DE.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/el-GR.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/en-GB.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/en-US.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/es-ES.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/es-MX.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/et-EE.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/eu-ES.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/fa-IR.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/fi-FI.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/fil-PH.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/fr-CA.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/fr-FR.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ga-IE.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/gd-gb.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/gl-ES.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/gu-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/he-IL.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/hi-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/hr-HR.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/hu-HU.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/hy-AM.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/id-ID.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/is-IS.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/it-IT.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ja-JP.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ka-GE.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/kk-KZ.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/km-KH.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/kn-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ko-KR.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/kok-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/lb-LU.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/lo-LA.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/lt-LT.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/lv-LV.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/mi-NZ.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/mk-MK.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ml-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/mr-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ms-MY.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/mt-MT.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/nb-NO.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ne-NP.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/nl-NL.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/nn-NO.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/or-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/pa-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/pl-PL.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/pt-BR.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/pt-PT.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/qps-ploc.yml Append localized “F5 refresh” segment to agents.footer_hint (pseudo-locale wrapper preserved) and lock F5.
tools/wta/locales/qps-ploca.yml Append localized “F5 refresh” segment to agents.footer_hint (pseudo-locale wrapper preserved) and lock F5.
tools/wta/locales/qps-plocm.yml Append localized “F5 refresh” segment to agents.footer_hint (pseudo-locale wrapper preserved) and lock F5.
tools/wta/locales/quz-PE.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ro-RO.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ru-RU.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/sk-SK.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/sl-SI.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/sq-AL.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/sr-Cyrl-BA.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/sr-Cyrl-RS.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/sr-Latn-RS.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/sv-SE.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ta-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/te-IN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/th-TH.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/tr-TR.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/tt-RU.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ug-CN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/uk-UA.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/ur-PK.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/uz-Latn-UZ.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/vi-VN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/zh-CN.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.
tools/wta/locales/zh-TW.yml Append localized “F5 refresh” segment to agents.footer_hint and lock F5.

Comment thread tools/wta/src/app.rs
@github-actions

Copy link
Copy Markdown

@check-spelling-bot Report

⚠️ Dictionary not found

Problems were encountered retrieving check dictionaries (cspell:ruby/dict/ruby.txt cspell:cpp/src/lang-jargon.txt cspell:fullstack/dict/fullstack.txt cspell:cpp/src/stdlib-cmath.txt cspell:cpp/src/template-strings.txt cspell:cpp/src/ecosystem.txt cspell:sql/src/tsql.txt cspell:powershell/dict/powershell.txt cspell:node/dict/node.txt cspell:cpp/src/compiler-clang-attributes.txt cspell:sql/src/sql.txt cspell:python/src/common/extra.txt cspell:svelte/dict/svelte.txt cspell:cpp/src/stdlib-c.txt cspell:python/src/python/python.txt cspell:dotnet/dict/dotnet.txt cspell:python/src/additional_words.txt cspell:python/src/python/python-lib.txt cspell:r/src/r.txt cspell:ada/dict/ada.txt cspell:monkeyc/src/monkeyc_keywords.txt cspell:haskell/dict/haskell.txt cspell:shell/dict/shell-all-words.txt cspell:dart/src/dart.txt cspell:scala/dict/scala.txt cspell:golang/dict/go.txt cspell:java/src/java-terms.txt cspell:latex/dict/latex.txt cspell:software-terms/dict/softwareTerms.txt cspell:java/src/java.txt cspell:elixir/dict/elixir.txt cspell:public-licenses/src/generated/public-licenses.txt cspell:cpp/src/lang-keywords.txt cspell:php/dict/php.txt cspell:typescript/dict/typescript.txt cspell:software-terms/dict/webServices.txt cspell:css/dict/css.txt cspell:lua/dict/lua.txt cspell:rust/dict/rust.txt cspell:cpp/src/compiler-gcc.txt cspell:clojure/src/clojure.txt cspell:html/dict/html.txt cspell:public-licenses/src/additional-licenses.txt cspell:swift/src/swift.txt cspell:django/dict/django.txt cspell:cpp/src/stdlib-cerrno.txt cspell:cpp/src/people.txt cspell:k8s/dict/k8s.txt cspell:redis/dict/redis.txt cspell:gaming-terms/dict/gaming-terms.txt cspell:cpp/src/compiler-msvc.txt cspell:docker/src/docker-words.txt cspell:cpp/src/stdlib-cpp.txt cspell:npm/dict/npm.txt).

⚠️ For more information, see check-dictionary-not-found.

🔴 Please review

See the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.

Unrecognized words (1)

cands

These words are not needed and should be removed Backgrounder CANTCALLOUT Ccc cplusplus ctl Debian dotnet drv endptr EOFs evt Fullwidth gitlab hdr idl IME inbox ININPUTSYNCCALL intelligentterminal Ioctl KVM lbl lld lsb NODEFAULT NONINFRINGEMENT notif oss outdir Podcast pri prioritization rcv segfault SND sourced SWP Tbl testname transitioning unk unparseable unregisters Virt VMs webpage websites WINVER xsi

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:microsoft/intelligent-terminal.git repository
on the dev/yuazha/session-mgmt-esc-restore branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/intelligent-terminal/actions/runs/28030408412/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (2064) from .github/actions/spelling/expect/alphabet.txt .github/actions/spelling/expect/expect.txt .github/actions/spelling/expect/web.txt and unrecognized words (1)

Dictionary Entries Covers Uniquely
cspell:csharp/csharp.txt 32 2 2
cspell:aws/aws.txt 232 2 2
cspell:fonts/fonts.txt 536 1 1

Consider adding to the extra_dictionaries array (in the .github/actions/spelling/config.json file):

    "cspell:csharp/csharp.txt",
    "cspell:aws/aws.txt",
    "cspell:fonts/fonts.txt",

To stop checking additional dictionaries, put (in the .github/actions/spelling/config.json file):

"check_extra_dictionaries": []
Warnings ⚠️ (1)

See the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.

⚠️ Warnings Count
⚠️ check-dictionary-not-found 54

See ⚠️ Event descriptions for more information.

✏️ Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

DDKinger and others added 2 commits June 24, 2026 10:30
Make F5 in the session-management (Agents) view reload the on-disk
historical session logs via master — the same `load_for_cli` scan the
startup history seed runs — instead of just re-listing master's cached
registry snapshot.

- Thread a `rescan` flag helper->master on `sessions/list`: F5 sets a
  sticky `pending_rescan` (survives in-flight coalescing); the helper
  forwards it; master, on rescan, runs `load_for_cli` off the LocalSet
  (spawn_blocking), upserts the results into the registry, then answers.
  A normal 5s poll / view-open / `wta sessions list` stay snapshot-only,
  and legacy empty `{}` params deserialize as rescan=false.
- After a successful rescan, master broadcasts `sessions/changed` so every
  window/tab with the view open refetches immediately (matching the
  startup scan) rather than waiting up to 5s. The triggered refetches are
  rescan=false, so they neither re-scan disk nor re-broadcast (no loop).
- Show the loading shimmer for the whole F5 refresh via a new
  `rescan_in_flight` flag, so F5 has visible feedback even when the list
  already has rows. A normal poll keeps it false and never flashes.

Adds unit tests for the rescan threading, the wire round-trip, and the
loading-during-rescan signal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The WSL scan extracts all four CLIs' session files from the running distro
into a temp $HOME-mirror, then parsed all four and discarded the
non-selected ones via retain_wsl_cli. Since a master is single-CLI, that
parsed (and threw away) up to three CLIs' transcripts on every scan.

Move the filter ahead of the parse: load_all_in now takes a cli_filter and
reuses cli_scan_flags (the host path's dispatch) to run only the selected
CLI's loader, so the other CLIs' transcripts in the extracted mirror are
never parsed. Thread cli_filter through
scan_running_distros -> scan_distros -> scan_distro_with -> load_all_in and
drop the now-redundant retain_wsl_cli.

The tar/extract is unchanged (the fetch script still tars all four), so this
saves only the parse cost, not the per-distro wsl.exe + tar/extract
overhead. Behavior is preserved: None / custom agents still scan all four.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 24, 2026 05:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 99 out of 99 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

tools/wta/src/session_registry.rs:246

  • build_sessions_list_request(false) now serializes params as { "rescan": false } instead of the historical empty {}. A pre-flag (older) master that still deserializes SessionsListParams as an empty struct would reject this as an unknown field, breaking even the normal snapshot-only sessions/list path in mixed-version scenarios (e.g. during upgrade/rollback). Consider keeping the on-wire params {} when rescan == false, and only include the field for the new rescan == true behavior.

@DDKinger DDKinger changed the title Add refresh to session management view Add refresh to re-scan on-disk history (host CLIs + currently-running WSL distros) Jun 24, 2026
DDKinger and others added 2 commits June 24, 2026 13:27
…mt-esc-restore

# Conflicts:
#	tools/wta/src/app.rs
The F5 history rescan (and the startup history seed) upserted disk-loaded
rows — status Historical, no pane binding — straight into master's registry.
`upsert` is insert-or-replace, so a reloaded Historical row overwrote a live
session's entry, dropping its status and pane binding; the session list then
showed the open session as Historical.

Add `SessionRegistry::upsert_if_absent` (atomic check-and-insert in
InMemoryRegistry, lookup-then-upsert default on the trait) and use it in both
the F5 rescan and the startup scan, so a reloaded row never replaces a session
already in the registry. Titles still refresh for existing rows via the
post-rescan `try_refresh_title_from_disk_with` pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 24, 2026 06:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 99 out of 99 changed files in this pull request and generated no new comments.

@DDKinger DDKinger merged commit 946dc6a into main Jun 24, 2026
8 of 10 checks passed
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