Skip to content

initial commit - #1

Merged
pschmidtke merged 5 commits into
masterfrom
version1
Feb 6, 2026
Merged

pschmidtke merged 5 commits into
masterfrom
version1

Conversation

@pschmidtke

Copy link
Copy Markdown
Contributor

Porting the GUI for 3decision structure, project and associated files loading to maestro.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces an initial implementation of a Maestro plugin for the 3decision structure database. The plugin enables users to search for structures, browse projects, load structures with transformation matrices, and access associated files directly from within Maestro.

Changes:

  • New plugin infrastructure with entry point and package structure
  • API client for 3decision REST API with authentication, search, and export capabilities
  • Full-featured GUI with tabbed interface for Search, Projects, and Associated Files
  • Support for loading PDB structures with transformation matrices and importing various file formats

Reviewed changes

Copilot reviewed 4 out of 13 changed files in this pull request and generated 35 comments.

Show a summary per file
File Description
threedecision_maestro.py Plugin entry point that handles module loading and error reporting
threedecision_maestro_dir/init.py Package initialization with version info and run_plugin function
threedecision_maestro_dir/api_client.py Comprehensive API client handling authentication, search, structure export, and file downloads
threedecision_maestro_dir/gui.py Main GUI implementation with search, projects, and files tabs plus dark theme styling
threedecision_maestro_dir/images/* UI assets including cog icons and logo files
README.md User documentation with installation, configuration, and usage instructions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread threedecision_maestro_dir/gui.py
Comment thread threedecision_maestro_dir/gui.py Outdated
Comment thread threedecision_maestro_dir/gui.py Outdated
Comment thread threedecision_maestro.py Outdated
Comment thread threedecision_maestro_dir/api_client.py
Comment thread threedecision_maestro_dir/gui.py
Comment thread threedecision_maestro_dir/gui.py Outdated
Comment thread threedecision_maestro_dir/gui.py
Comment thread threedecision_maestro_dir/gui.py
Comment thread threedecision_maestro_dir/gui.py

Copilot AI commented Feb 6, 2026

Copy link
Copy Markdown

@pschmidtke I've opened a new pull request, #2, to work on those changes. Once the pull request is ready, I'll request review from you.

pschmidtke and others added 2 commits February 6, 2026 08:55
[WIP] Fix issues based on review comments from initial commit
Security improvements:
- Add sanitize_filename() to prevent path traversal attacks
- Add sanitize_surface_name() for safe Maestro command injection
- Replace bare except clauses with specific exception types
- Set config file permissions to 0600

New features:
- Add SSL certificate verification toggle in Settings dialog
- Extract color constants for maintainable theming
- Create create_dark_palette() helper to eliminate duplicate code

Code quality:
- Move identity_matrix outside loop for efficiency
- Update test_connection to make real HTTP request
- Convert DARK_STYLESHEET to f-string using color constants
- Update all inline styles to use color constants

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pschmidtke

Copy link
Copy Markdown
Contributor Author

Changes addressing Copilot review comments

Security improvements

  • Added sanitize_filename() function to prevent path traversal attacks on all file downloads
  • Added sanitize_surface_name() function to prevent command injection in Maestro visimport commands
  • Replaced all bare except: clauses with specific exception types (FileNotFoundError, OSError, ImportError, etc.)
  • Set config file permissions to 0600 to protect API credentials

New features

  • Added SSL certificate verification toggle in Settings dialog (useful for testing with self-signed certs)

Code quality improvements

  • Extracted 17 color constants (COLOR_DARK_BG, COLOR_ACCENT, COLOR_ERROR, etc.) for maintainable theming
  • Created create_dark_palette() helper function to eliminate duplicate QPalette creation code
  • Converted DARK_STYLESHEET to f-string using color constants
  • Updated all inline styles throughout the codebase to use color constants
  • Moved identity_matrix definition outside loop for efficiency
  • Updated test_connection() to make a real HTTP request to validate the token instead of just checking if configured

Files modified

  • threedecision_maestro.py - Fixed bare except clause
  • threedecision_maestro_dir/api_client.py - Added SSL config, improved test_connection, added save_ssl_setting
  • threedecision_maestro_dir/gui.py - Security functions, color constants, SSL checkbox, code cleanup

Revert to simpler approach: trust the token if we have one.
The _request_with_retry method already handles re-authentication
when tokens expire during actual API calls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pschmidtke

Copy link
Copy Markdown
Contributor Author

Fix pushed: The test_connection() method was breaking search because it tried to hit the root URL which isn't a valid API endpoint. Reverted to simpler approach - trust the token if we have one, let _request_with_retry handle re-auth when needed.

@pschmidtke
pschmidtke merged commit 1d98796 into master Feb 6, 2026
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