Extract the server catalog model into aqomui/catalog.py #125

Open
opened 2026-08-23 01:43:51 -04:00 by mysticalsoap · 0 comments
Owner

The #83 seam-3 catalog: server_dict / protocol_dict / favourites and every operation on them, as a plain Qt-free class the widgets render.

Moves out of AqomuiGui:

  • server.json / protocol.json load and save (a dozen inline json.dump sites)
  • country/provider/tunnel list derivation and malformed-entry pruning (pop_boxes)
  • filter predicates — country/provider/protocol, free text, favourites (filter_servers, filter_by_text, show_favourite_servers keep only the row hiding)
  • the latency-sorted index (index_list plus display_latency's bisect bookkeeping)
  • favourite toggling and the random-favourite pool (change_favourite, choose_random_server)
  • import merge (downloaded): per-provider server replacement, favourite preservation, protocol selected carry-over
  • data side of server/provider deletion and editing (del_single_server, del_provider, apply_edit)
  • profile resolution (connect_profile's filtering and Fastest / Fast-Random / Random modes)
  • utils.create_server_dict is the same model's connect-time projection

Interface: queries (keys visible under a filter, resolve profile/random/favourite to a concrete server dict), mutations (merge import, toggle favourite, delete, record latency), one changed notification the list widget repopulates from — far narrower than the ~600 lines it absorbs.

Qt-free per the #83 placement rule: the cli recreates catalog operations by hand today (protocol selection, provider deletion, server listing) and has drifted doing it — both its create_server_dict calls pass two args to the three-arg signature, so -c/-v die on TypeError.

Tangles: #123 resolves random/profile/favourite modes through this model and lands with or after it; #52 sits under the country handling; #70 reshapes only the rendering side.

The #83 seam-3 catalog: server_dict / protocol_dict / favourites and every operation on them, as a plain Qt-free class the widgets render. Moves out of AqomuiGui: - server.json / protocol.json load and save (a dozen inline `json.dump` sites) - country/provider/tunnel list derivation and malformed-entry pruning (`pop_boxes`) - filter predicates — country/provider/protocol, free text, favourites (`filter_servers`, `filter_by_text`, `show_favourite_servers` keep only the row hiding) - the latency-sorted index (`index_list` plus `display_latency`'s bisect bookkeeping) - favourite toggling and the random-favourite pool (`change_favourite`, `choose_random_server`) - import merge (`downloaded`): per-provider server replacement, favourite preservation, protocol `selected` carry-over - data side of server/provider deletion and editing (`del_single_server`, `del_provider`, `apply_edit`) - profile resolution (`connect_profile`'s filtering and Fastest / Fast-Random / Random modes) - `utils.create_server_dict` is the same model's connect-time projection Interface: queries (keys visible under a filter, resolve profile/random/favourite to a concrete server dict), mutations (merge import, toggle favourite, delete, record latency), one changed notification the list widget repopulates from — far narrower than the ~600 lines it absorbs. Qt-free per the #83 placement rule: the cli recreates catalog operations by hand today (protocol selection, provider deletion, server listing) and has drifted doing it — both its `create_server_dict` calls pass two args to the three-arg signature, so `-c`/`-v` die on TypeError. Tangles: #123 resolves random/profile/favourite modes through this model and lands with or after it; #52 sits under the country handling; #70 reshapes only the rendering side.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mysticalsoap/aqomui#125
No description provided.