implement Qt6 views#1446
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| train.bat | ||
| debug_report.log | ||
| config_diff.txt | ||
| CLAUDE.md |
There was a problem hiding this comment.
FYI, you should definitely push your CLAUDE.md and treat it as a development guide for the project :)
There was a problem hiding this comment.
mine is not good enough for general use. I used the first draft claude made because I was still learning to use claude, and then worked with additional PLAN files
There was a problem hiding this comment.
Maybe then a good opportunity would be to describe in CLAUDE.md your programming rules for the repo and the entrypoints of pyside UI that this MR introduce? and then each new MR would build on top of it to describe different branch of the codebase wdyt?
There was a problem hiding this comment.
I'm still not experienced enough with Claude Code to do that, but PRs welcome.
I also have second thoughts about encouraging AI PRs. It has obviously become a good tool for a large refactoring like this one, that wouldn't have been possible without AI.
But all code using AI code must be reviewed before submitting it as a PR. That can't become the PR reviewer's job. So you must still already know the codebase to contribute.
There was a problem hiding this comment.
Fair point. Wdyt of adding a PR template with a checklist contributors have to tick before opening, something like "I've read and understand all changes in this diff" and "I've tested locally"? It won't stop people from lying, but vibe coded mess is easy to spot anyway.
I can include that in the same PR as the CLAUDE.md if it sounds useful.
There was a problem hiding this comment.
no strong opinions on this from me. It would be nice to know what stage the code is, like
- manually written code
- AI generated prototype, works but unreviewed
- human reviewed by submitter but will re-work
- fully human reviewed, ready for PR review
- ...
but I'm not sure how to enforce that. if the templates get too much, nobody follows them
There was a problem hiding this comment.
I'll have a dab along with the Claude.md/agents.md and potentially some skills useful - thanks for the feedback
| return lo | ||
|
|
||
|
|
||
| def _alignment(sticky: str) -> Qt.AlignmentFlag: |
There was a problem hiding this comment.
the components API is still very Ctk-centric. the sticky parameter for example is what Ctk expects, and translated here to equivalent Qt.
this could be refactored further, but I think that's for later.
…UIView Now handled by path_entry in the base class. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- PySide6TrainUIView: create train_config/ui_state/controller before base init so they can be passed as constructor params; replace self.train_config with self.controller.train_config throughout - PySide6CloudTabView: pass controller to BaseCloudTabView.__init__; remove now-redundant self.controller assignment - PySide6ConceptTabView: implement _update_filters() (removed from base); pass concept to BaseConceptWidgetView.__init__ - PySide6TrainingTabView: remove callbacks dict; call build() without it; implement 6 abstract methods with logic inlined from private helpers; remove now-unused private helper methods Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…abView Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
UIState's enum trace looks up var_type[string], so the var must hold the string repr of the value, not the value itself. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Builds on the controller-view abstraction introduced in the previous PR. That PR made all business logic toolkit-independent and defined UI content in toolkit-neutral base views. This PR adds a PySide6 frontend without touching any of that shared code.
Three pieces are needed to make
build_contentrun under Qt:pyside6_components— mirrors thectk_componentsAPI with Qt widgets.self.components.label(...),self.components.options(...)etc. resolve to Qt implementations when a PySide6 view passes this namespace at construction.QtVar/PySide6UIState— Qt equivalent of tkinter variables andUIState.QtVarwraps a value and fires Qt signals on change;PySide6UIStateexposes the same interface controllers and base views expect.PySide6*Viewclasses — inherit from the Qt window/widget base and the sharedBase*View. ForTrainUI,PySide6TrainUIView(QMainWindow, BaseTrainUIView)reusesTrainUIControllerandBaseTrainUIViewunchanged.The PySide6 UI is launched via
./run-cmd.sh train_ui_pyside6. The CTK UI is unaffected and is still started using./start-ui.sh.