Skip to content

Document the architecture, rebuild the README around real screenshots, and analyse every branch - #132

Merged
JE-Chen merged 10 commits into
mainfrom
dev
Aug 2, 2026
Merged

Document the architecture, rebuild the README around real screenshots, and analyse every branch#132
JE-Chen merged 10 commits into
mainfrom
dev

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Aug 2, 2026

Copy link
Copy Markdown
Member

Brings the accumulated dev work to main. Ten commits, of which six are from
this round of documentation and CI work and four are earlier feature work that
had not yet been released.

Documentation

  • architecture_explore.md is new: a module-by-module map of the tree — layers,
    what each package does, where the design patterns land, the threading model
    behind the subprocess executors, where per-user data is persisted, and a list
    of rough edges found while reading the code.
  • The README is rebuilt around twenty screenshots rendered from the actual
    widgets, each showing real input through the real code path. The two
    thousand-word paragraphs on cURL and HAR import are cut back to what the
    screenshots do not already say, and a testing/CI section is added.
  • CLAUDE.md drops the half of its content that was generic Python knowledge and
    keeps what is specific to this project. Its architecture tree, which had
    drifted past several packages, is rewritten, and a rule now requires
    architecture_explore.md to be updated in the same change that makes it stale.

Static analysis

  • SonarCloud moves from Automatic Analysis to CI-based analysis. Automatic
    Analysis only ever looks at the main branch and at pull requests, so dev had
    gone unanalysed since the branch existed. Both workflows gain a sonarcloud
    job, skipped on the nightly schedule and on fork pull requests.
  • The SonarCloud project key was renamed in place from
    Integration-Automation_AutomationIDE to Integration-Automation_PyBreeze;
    all eleven analyses back to October 2025 are intact.
  • docs/source/conf.py no longer shadows the copyright builtin, clearing the
    one issue Codacy reports. Sphinx has provided project_copyright as an alias
    since 3.5, so the rendered footer is unchanged.

Known red check

The sonarcloud job fails with "You are running CI analysis while Automatic
Analysis is enabled". Disabling Automatic Analysis is a UI-only setting with no
API, so it needs one toggle at SonarCloud → PyBreeze → Administration →
Analysis Method
. Everything else in the scan already works: the token
authenticates, the project and branch resolve, and quality profiles and active
rules load.

JE-Chen added 10 commits July 28, 2026 13:03
The Chain-of-Thought review framework reads a file or a pull request and
reports what it found; until now nothing in the IDE could reach it. It now
sits with the other automation tools: Automation > Code Review reviews the
file being edited or a pull request, and the output streams into a run
window like any other run.

One settings form holds what a review needs -- the inference backend and
where it is, the code host, the repository -- and every one of those is
handed to the child process as a PRTHINKER_* environment variable. That is
deliberate for the keys and the token: a command line is visible in a task
manager and lands in logs, and an environment variable does not.

The framework installs from source rather than from PyPI, so the install
entry asks for its folder once, remembers it, and installs that folder with
its runner extras. It needs Python 3.12 or newer, which is a property of
the interpreter chosen for running, not of the editor.

A file has to be saved before it can be reviewed, and a pull request review
needs a repository in the settings; both say so rather than starting a run
that could only fail.
- zip() over request/name and node/offset pairs now uses strict=True; both
  rely on equal-length sequences, so a mismatch silently dropped items.
- subprocess.run() calls that inspect returncode themselves now pass
  check=False explicitly.
- Move the S310 suppression onto the Request() call it applies to; the
  directive sat on the following line and suppressed nothing.
DiagramEditorWidget.__init__ and DiagramPropertyPanel.__init__ each built
their whole UI inline (101 and 106 statements); both are now split into
per-section builders.

tools_menu repeated the same eight-line action block seventeen times and
kept a second copy of every widget factory. Tab and dock actions are now
driven by tables sharing one _WIDGET_FACTORIES registry, matching the
dispatch-table pattern the module already used for docks.

Also gives ColorButton a per-instance default colour instead of one QColor
built at import time and shared by every instance.
…can-fixes

Fix zip and subprocess invariants, split oversized UI builders
architecture_explore.md walks the whole tree: the layer diagram, what each
package does, where the design patterns land, the threading model behind the
subprocess executors, where per-user data is persisted, and a running list of
rough edges found while reading the code.
Twenty screenshots rendered from the actual widgets, each showing real input
through the real code path: the curl and HAR importers generating scripts, the
response inspector and header analyzer reporting on pasted traffic, the diagram
editor laying out an imported Mermaid flowchart, and the run window streaming a
genuine subprocess.

The two thousand-word paragraphs on curl and HAR import are cut down to what the
screenshots do not already say. Adds a testing and CI section, and drops the
claim that language plugins ship with the project — exe/jeditor_plugins/ does
not exist, so PLUGIN_GUIDE.md describes them as examples instead.
Half the file was generic Python knowledge — PEP 8 naming, f-strings over %,
is None, enumerate, mutable defaults — that carried no information about this
project. That collapses to one line deferring to ruff, leaving the rules that
are actually specific here: the SSRF checklist and its reference
implementations, the SSH host-key policy, why the embedded JupyterLab may leave
its token empty, secrets travelling as environment rather than argv, and the
complexity gates. 258 lines down to 130.

The architecture tree had drifted past diagram_editor, tools_gui, dialog,
prthinker and ten utils subpackages, so it is rewritten from the tree as it
stands, with the CI matrix and the PackageManager description corrected to
match. A new rule requires architecture_explore.md to be updated in the same
change that makes it stale, which is what would have caught that drift.
Sphinx has provided project_copyright as an alias for copyright since 3.5,
precisely so a conf.py need not redefine the builtin of that name. Using it
clears the one issue Codacy reports against the repository and drops a noqa
whose justification -- that Sphinx requires the exact name -- was not true.

Verified by building the docs: the rendered footer is unchanged.
Automatic Analysis only ever looks at the main branch and at pull requests, so
dev had gone unanalysed since the branch existed -- SonarCloud held one branch,
last scanned weeks ago. The two analysis modes are mutually exclusive, so
covering dev means turning Automatic Analysis off and running the scanner from
the workflows instead.

Both workflows gain a sonarcloud job on ubuntu, parallel to the test matrix. It
is skipped on the nightly schedule, where re-scanning an unchanged commit adds
nothing, and on fork pull requests, which cannot read the token. The scanner
needs full history to attribute new code, hence fetch-depth: 0.

.sonarcloud.properties was read only by Automatic Analysis; its settings move
verbatim into sonar-project.properties alongside the project and organization
keys the CI scanner needs.
The project key still carried AutomationIDE, the name the repository had two
renames ago. SonarCloud can change a key in place, so the project was renamed to
Integration-Automation_PyBreeze rather than recreated: all eleven analyses going
back to October 2025 are intact, as are the quality gate and the branch settings.
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 3 high

Alerts:
⚠ 3 issues (≤ 0 issues of at least minor severity)

Results:
3 new issues

Category Results
Security 3 high

View in Codacy

🟢 Metrics 78 complexity · 0 duplication

Metric Results
Complexity 78
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@sonarqubecloud

sonarqubecloud Bot commented Aug 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@JE-Chen
JE-Chen merged commit 71d9233 into main Aug 2, 2026
10 of 14 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.

1 participant