Skip to content

Conversation

@jmxpearson
Copy link
Contributor

Based on @rwschonberg's #184, but with substantial simplifications.

  • Removed lots of code in nexus.py, including removal of all special-casing for GUI and TUI.
  • Distilled a single quit path in Nexus that simplifies exit logic.
  • Rewrote demos/bubblewrap to use new 0MQ actors. This establishes a new pattern for future GUIs to adopt.
  • Introduced some additional error handling to reduce brittleness and user gotchas.

Richard Schonberg and others added 30 commits January 18, 2025 18:17
- reformatting yaml file for new links
- changing readme for new formats
- rewriting GUI as a single actor with an encapsulated state that's
  passed to QT front end
- trying to remove special-case GUI code (commented out in nexus.py)
- currently not working; starting GUI seems to leave zmq sockets in a
  bad state; calling exec function may block
- quitting GUI sends quit but it doesn't work
- need to overhaul comms with nexus to remove special cases
- currently need logging to be set up before registering with nexus
- probably want to have a default that works without this in future
  (perhaps with a warning)
- these messages now start with Nexus, so that all message types start
  with their _source_
- Actor Signal messages originate at actors as control signals back to
  nexus
- this was parameterized in order to test some specific functionality,
  but that led to much harder to read code that was only leveraged in a
  single test case
- on the way to removing it as an option
- now there's a single flow for processing actor input, branching based
  on message type
- still work to do on simplifying quit pathway (better now!) and
  removing dead code
- still some problems with TUI signaling via the output port
- got rid of extra async that was slowing down quitting
- TUI now quits if it gets QUIT in reply on nexus control port also
  (probably good to leave in quit option on other port, too)
- direct send of text to TUI doesn't seem to be working, though
- TUI logging needs to know log pull port (not available at spinup)
- quit now works well
- tui sends "ready" on startup and prints "Awaiting input:"
- "QUIT" is now broadcast from quit path, not reply on signal port
- this makes sure TUI doesn't try to "phone home" to Nexus and send a
  ready signal during app testing
- previously, we only published logging sub port; actors couldn't post
  directly to logger without being spawned from nexus
- now we pick pub port at runtime from cli; this allows, e.g., TUI and
  GUI(s) access to logger as well
- lots of updates to tests
- still need to verify TUI logging works, but nothing is throwing an
  error
- still don't like cli.py names for logging ports, but pub and pull are
  reasonable internal names
- make sure you sanitize your ports correctly!
- comms between GUI and Nexus appear to be working
- current troubles are with reading data and processing actor errors
- need to guard against TimeoutError when we try to get data
- fixing some other bugs from previous ways of doing things
Copy link
Collaborator

@draelos draelos left a comment

Choose a reason for hiding this comment

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

Tweaked a few minor things but everything is essentially addressed from earlier requested changes, besides things we will address in future PRs.

@jmxpearson jmxpearson merged commit 84f7b80 into dev Nov 18, 2025
33 of 36 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.

4 participants