Repository navigation
fix: GUI + API Client bugfixes (v2.2.1) - #37
Conversation
…derer, tab overflow, session context)
Dashboard:
- Add INFO severity card (5th column) + summary panel with top modules
- Wire INFO count through GuiStatusBar and AnarCryGui.incrementSeverityCount
API Client - BruImporter:
- Parse collection.bru for root auth/headers (RootConfig) -- fixes token not propagating
- Skip folder.bru as request items, use for folder name + root config
- Handle auth:inherit in method block KV parsing
- New parseRootConfig() resolves auth mode selector + auth:bearer/basic blocks
- New parseMetaName() extracts folder name from meta block
- Fix brace-depth parser replacing broken regex for body:json with {{template}} vars
API Client - ApiClientView:
- Replace HTML tree renderer with custom JPanel renderer (method label + name label)
- Tab bar overflow with ">>" dropdown button, active tab always visible
- Persistent session context (RunContext) for token propagation across requests
- Auto-extract token from JSON responses (token, accessToken, access_token, jwt)
- Remove dead escapeHtml() method
RequestExecutor:
- Use Objects.equals() for nullable uid comparison (NPE fix)
AiAssistant:
- Add [Consultando ...] feedback message during tool calls
- Error handling for tool call failures
Semgrep Static Analysis
|
SpotBugs + FindSecBugs
✅ No high-priority issues. |
Security Scan Summary
✅ All security checks passed! |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 776 |
| Duplication | 51 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
…Encoded, cookie jar 1. Folder variables no longer silently discarded -- mergeInherited() now loads folder vars into the actual VariableStore instead of a dummy 2. buildCurrentRequestItem() now includes params (query + path), pre/post vars, and assertions from the editor tabs -- previously only sent method/URL/headers/body/auth 3. FormUrlEncoded body type now correctly builds BodyConfig.FormUrlEncoded with parsed key=value params instead of falling through to Json 4. CookieManager wired to HttpClient via cookieHandler() -- Set-Cookie headers now persist across requests in the same session
There was a problem hiding this comment.
Pull Request Overview
Three high-confidence logic defects should be fixed before merging: null request IDs can misassign folder configuration, brace parsing can break on quoted JSON content, and clearing the selected environment can leave stale variables active.
The requested regression scenarios and build verification are all marked missing, so several acceptance criteria remain unverified, particularly around importer behavior, GUI updates, persistence, and assistant feedback.
About this PR
- Add automated regression coverage for the changed importer, request execution, persistence, GUI, and assistant behaviors, and include build/format verification in CI or the PR validation.
Test suggestions
- Import a Bruno collection with collection-level bearer authentication and headers.
- Verify folder.bru is excluded from request items while folder metadata and configuration are retained.
- Execute a request with auth: inherit and resolve folder or collection authentication.
- Parse Bruno blocks containing template variables and nested braces.
- Verify dashboard INFO counts, five severity cards, status-bar counts, and summary text.
- Verify overflowing request tabs appear in the dropdown and selecting one activates it.
- Verify JSON token extraction persists the token for a subsequent request.
- Verify nullable request IDs do not cause unrelated requests to be assigned to the same folder.
- Verify AI tool-call progress and failure feedback.
- Run spotlessCheck and compileJava successfully.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Import a Bruno collection with collection-level bearer authentication and headers.
2. Verify folder.bru is excluded from request items while folder metadata and configuration are retained.
3. Execute a request with auth: inherit and resolve folder or collection authentication.
4. Parse Bruno blocks containing template variables and nested braces.
5. Verify dashboard INFO counts, five severity cards, status-bar counts, and summary text.
6. Verify overflowing request tabs appear in the dropdown and selecting one activates it.
7. Verify JSON token extraction persists the token for a subsequent request.
8. Verify nullable request IDs do not cause unrelated requests to be assigned to the same folder.
9. Verify AI tool-call progress and failure feedback.
10. Run spotlessCheck and compileJava successfully.
Make this review better
TIP Add a ticket key to the branch or title so the reviewer can check the PR against it. Or tell us which ticket tracker you use here.
TIP Add Codacy review.md instructions or an AGENTS.md so the reviewer knows your conventions.
TIP How was this review? Give us feedback
| if (ci instanceof Folder folder) { | ||
| for (CollectionItem child : folder.items()) { | ||
| if (child instanceof RequestItem ri && ri.uid().equals(item.uid())) { | ||
| if (child instanceof RequestItem ri && java.util.Objects.equals(ri.uid(), item.uid())) { |
There was a problem hiding this comment.
🔴 HIGH RISK
Do not treat two null UIDs as equal; compare object identity or require both UIDs to be non-null before comparing them. Otherwise requests without assigned IDs can inherit configuration from an unrelated folder.
TIP React 👍 if this review is right, or reply with what's wrong and how it could be better to help improve the reviewer.
| vars.loadEnv(env); | ||
| } | ||
| sessionContext = new RunContext(vars); | ||
| } else if (env != null) { |
There was a problem hiding this comment.
🟡 MEDIUM RISK
Reset or rebuild the session variable store whenever the selected environment changes, including when the environment is null, so stale variables are not used.
TIP React 👍 if this review is right, or reply with what's wrong and how it could be better to help improve the reviewer.
|
|
||
| // Walk forward counting braces to find the matching '}' | ||
| while (i < len && depth > 0) { | ||
| char c = text.charAt(i); |
There was a problem hiding this comment.
🟡 MEDIUM RISK
Track quoted-string and escape state while scanning block contents so braces inside strings do not affect nesting depth.
TIP React 👍 if this review is right, or reply with what's wrong and how it could be better to help improve the reviewer.
Semgrep Static Analysis
|
SpotBugs + FindSecBugs
✅ No high-priority issues. |
Security Scan Summary
✅ All security checks passed! |
…un results panel Phase 1-3 implementation closing Bruno Desktop feature gaps: - Auth CardLayout forms for all 12 auth types (Basic, Bearer, JWT, OAuth1, OAuth2, AWS v4, Digest, Hawk, NTLM, Akamai EdgeGrid, API Key, Cookie) - 4 new auth injectors: AwsV4, EdgeGrid, NTLM, OAuth1 - GraalJS scripting engine with bru/req/res bridge objects for pre-request and post-response scripts - KvTableEditor reusable component for headers, params, form body - Run results panel replacing JOptionPane with status/headers/body tabs - Status code coloring (green 2xx, orange 3xx/4xx, red 5xx) - Cookies response tab from CookieManager - Copy cURL button via CurlGenerator - Insomnia JSON collection importer - Auth inherit propagation in combo selector - Request history sidebar with timestamp navigation - Variable inspector tab showing env/collection/folder/request vars - Proxy settings UI (host, port, auth, bypass list) - Body CardLayout switching text editor vs form table - BruImporter script block parsing - RequestExecutor scripting integration (pre/post execution) - Version bump 2.2.0 -> 2.2.1
Semgrep Static Analysis
|
SpotBugs + FindSecBugs
✅ No high-priority issues. |
Security Scan Summary
✅ All security checks passed! |
AnarCryLaf.installLight() with dedicated light customizations. Theme-aware helpers (fg, bg, border, buttonBg, sectionLine) replace hardcoded dark-only constants across DashboardView, AssistantView, GlobalSearchDialog, LogPane, and GuiModulesPanel.
Replace Unicode/emoji text with 16x16 PNG icons (Tabler Icons, MIT). Add theme toggle, GitHub repo link, license info, keybindings buttons. Cookies click opens Preferences. StatusBarIcons loader with fallback.
…export Auth variable interpolation in all 12 AuthConfig variants. GraalJS pre-request/post-response/test scripts. cURL export, Insomnia import. Tab content badges, query/path param split, description column, tab state cache. Proxy sidebar removed (centralized to Preferences).
AppSettings singleton persists all preferences to ~/.anarcry/settings.json via Gson. Loads on startup, saves on Apply. PreferencesDialog reworked: 10 category tabs, Check for Updates (GitHub API), support panel with art and hyperlinks, certificates panel (PEM/PKCS12 client certs, custom CA). Proxy moved from API Client sidebar to Preferences. AnarCryGui builds ProxySelector + SSLContext from Preferences and injects via setNetworkConfig. Saved theme and resolution applied on app launch.
Changelog updated with Preferences persistence, light theme, proxy centralization, certificates panel, SSL context builder, Check for Updates, status bar icons. Architecture tree adds AppSettings and PreferencesDialog. Launcher window size bumped to 200x92c.
Semgrep Static Analysis
|
SpotBugs + FindSecBugs
✅ No high-priority issues. |
Security Scan Summary
✅ All security checks passed! |
DigestAuthInjector MD5 (RFC 7616 requires MD5 for HTTP Digest Auth) and WsseInjector SHA-1 (WSSE PasswordDigest spec requires SHA-1) are protocol-mandated, not security flaws. Added nosemgrep inline suppressions alongside existing SonarQube @SuppressWarnings.
SpotBugs + FindSecBugs
✅ No high-priority issues. |
Semgrep Static Analysis
✅ No issues found. |
Security Scan Summary
✅ All security checks passed! |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 778 |
| Duplication | 56 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
Logo (logoAnarChyNoBG.png) resized to 64/128/256px for window icon (taskbar + title bar) and 400px for splash screen. SplashScreen shows logo with version and loading indicator while GUI initializes, dismissed when the main frame becomes visible.
Semgrep Static Analysis
✅ No issues found. |
SpotBugs + FindSecBugs
✅ No high-priority issues. |
Security Scan Summary
✅ All security checks passed! |
…reset AnarCryLaf: add theme listener system and resetColors() that nullifies non-UIResource backgrounds/foregrounds on the entire component tree before running custom listeners, ensuring no stale colors survive a toggle in either direction. ApiClientView: RSyntaxTextArea picks dark.xml/default.xml based on current theme; method badge backgrounds use light tints in light mode; tree/tab label colors use AnarCryLaf.fg() instead of hardcoded white. RepeaterView: same RSyntaxTextArea theme-aware fix. AssistantView, LogPane, DashboardView: theme listeners to refresh custom backgrounds, JFreeChart paints, and text colors on toggle. AnarCryGui, PreferencesDialog: call fireThemeChanged(frame) after updateComponentTreeUI to apply custom colors last.
SpotBugs + FindSecBugs
✅ No high-priority issues. |
Semgrep Static Analysis
✅ No issues found. |
Security Scan Summary
✅ All security checks passed! |
DigestAuthInjector uses MD5 (RFC 7616) and WsseInjector uses SHA-1 (WSSE PasswordDigest spec). Both are protocol requirements, not application-level crypto choices.
Semgrep Static Analysis
✅ No issues found. |
SpotBugs + FindSecBugs
✅ No high-priority issues. |
Security Scan Summary
✅ All security checks passed! |
Summary
collection.brufor root auth/headers, skipfolder.bruas request items, handleauth: inheritin method blocks, fix brace-depth parser for{{template}}varsObjects.equals()for nullable uid[Consultando ...]feedback + error handling for tool callsTest plan
collection.brucontainingauth: bearer-- verify root config parsedfolder.brufiles no longer appear as "GET (no url)" requests in treeauth: inherit-- verify token propagates from collection rootspotlessCheckandcompileJavapass