Skip to content

Fix sdwdate status icon display for unknown clients#5

Open
assisted-by-ai wants to merge 1 commit intoKicksecure:masterfrom
assisted-by-ai:claude/fix-sdwdate-context-menu-3Z1PY
Open

Fix sdwdate status icon display for unknown clients#5
assisted-by-ai wants to merge 1 commit intoKicksecure:masterfrom
assisted-by-ai:claude/fix-sdwdate-context-menu-3Z1PY

Conversation

@assisted-by-ai
Copy link
Copy Markdown

Summary

Modified the client icon selection logic in the menu regeneration function to properly handle clients with unknown sdwdate status by displaying a BUSY icon instead of skipping them entirely.

Key Changes

  • Changed the conditional logic from elif client.sdwdate_status != SdwdateStatus.UNKNOWN to an else block that handles all non-Tor status cases
  • Added explicit handling for SdwdateStatus.UNKNOWN by mapping it to SdwdateStatus.BUSY for icon display purposes
  • Removed the continue statement that was skipping clients with unknown sdwdate status, ensuring they now appear in the menu with an appropriate icon

Implementation Details

  • Clients with unknown sdwdate status are now treated as busy rather than being excluded from the menu
  • The effective status is determined before icon selection, making the logic clearer and more maintainable
  • This change ensures all clients are represented in the UI menu, improving visibility and user experience

https://claude.ai/code/session_01JuseGKPwFHpNLEXj3Fzp8L

When a client connects and sets its name but hasn't yet reported its
sdwdate status, regen_menu() would skip the client entirely due to
the `else: continue` branch when sdwdate_status is UNKNOWN and
tor_status is not STOPPED/DISABLED. This caused only "Exit" to appear
in the right-click menu during the timing window between client name
registration and the first status update.

Instead of skipping unknown-status clients, treat them as BUSY
(showing the waiting icon) so the full menu is always available.

https://claude.ai/code/session_01JuseGKPwFHpNLEXj3Fzp8L
@ArrayBolt3
Copy link
Copy Markdown
Contributor

Will merge this. The implementation given here is a bit inefficient, and also may show clients that aren't fully "ready" (i.e. ones that have not specified a non-UNKNOWN Tor or sdwdate status), but the general idea makes sense, and I was able to make an implementation that I believe is good.

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