A lost helper reply leaves the Insights recording switch unconfirmed

Open
#285 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
50/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
swift
Domain
backend, desktop

Research direction

Read Sources/GUI/App/HelperClient.swift:423-436 and 544-561 to understand the helper connection and error handling, then trace the recording operation at 777-785 and switch behavior in Sources/GUI/Views/InsightsView.swift:939-949. Reproduce the interrupted request on a signed build and check how reconnection affects the displayed value. Done when a lost reply produces a visible result and the switch reflects a helper-confirmed value.

Written by the indexing model from the issue text.

Description

area:gui bug priority:medium status:queued type:correctness

HelperClient.swift:544-546 creates the shared proxy with the empty error handler { _ in }. The recording operation at lines 777-785 completes only through its reply, while InsightsView.swift:939-949 changes the switch first and rolls it back only on a failed completion. A transport failure can therefore leave the requested value displayed without confirmation. The general helper banner can show the disconnect, but reconnection bootstraps AppState rather than rerunning this model's once-only attachment; this does not establish that recording actually changed.

Steps

  1. Start with Insights recording off, then switch it on.
  2. On a controlled installation, interrupt the helper connection before the operation commits or replies.
  3. Observe the general disconnect banner.
  4. The switch keeps its optimistic on value without an operation-specific failure until another refresh reconciles it.

Where

  • Sources/GUI/App/HelperClient.swift:423-436
  • Sources/GUI/App/HelperClient.swift:544-561
  • Sources/GUI/App/HelperClient.swift:777-785
  • Sources/GUI/Views/InsightsView.swift:744-748
  • Sources/GUI/Views/InsightsView.swift:939-949

Done when: A lost recording reply ends the pending action with a visible result and a helper-confirmed switch value.

Related: #246, #267

I found this reading the code and haven't reproduced it on a signed build yet: interrupting an in-flight recording request and checking reconnection behavior needs a signed-build check.

Dominant language
Swift
Stars
49
Forks
5
Avg merge
16h 48m
Merged PRs (30d)
82

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from isaaclins/freesnitch

All issues in isaaclins/freesnitch

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.