Skip to content

feat: improved ux#2382

Merged
RohitKushvaha01 merged 3 commits into
Acode-Foundation:mainfrom
RohitKushvaha01:fix_garbage_ux
Jun 25, 2026
Merged

feat: improved ux#2382
RohitKushvaha01 merged 3 commits into
Acode-Foundation:mainfrom
RohitKushvaha01:fix_garbage_ux

Conversation

@RohitKushvaha01

@RohitKushvaha01 RohitKushvaha01 commented Jun 25, 2026

Copy link
Copy Markdown
Member
  • Cloned Plugin Locally & Fixed Offline Terminal Creation
  • Disabled Quicktools in media files
  • Hide quick tools toggler in welcome page

Closes #2357

@greptile-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR improves the UX around quick tools visibility and fixes offline terminal creation. The hideQuickTools flag is added to EditorFile instances for video, audio, image, and welcome tabs; tab-switch enforcement is handled in EditorFile.makeActive(), with matching guards in applySettings.afterRender() and the floatingButton setting handler.

  • Offline terminal fix: All four cordova.plugin.http.sendRequest and WebSocket URLs in terminal.js switch from localhost to 127.0.0.1, bypassing DNS resolution that can fail on Android when offline.
  • Quick-tools UX: Media and welcome tabs hide the quick-tools bar and floating toggler on activation and correctly restore them when switching back to a normal editor file; defaults updated to compact single-row mode with the toggler enabled.
  • Plugin vendoring: cordova-plugin-advanced-http is vendored as an unmodified local copy of v3.3.1 (matching the previous npm pin), following the existing pattern for other local plugins in src/plugins/.

Confidence Score: 5/5

The changes are safe to merge — all three functional areas (offline terminal fix, quick-tools visibility, plugin vendoring) are self-contained and the implementation is consistent across the affected call sites.

The localhost → 127.0.0.1 fix is a well-understood loopback change applied uniformly to all four affected URLs. The hideQuickTools feature is correctly enforced at every entry point: tab switch (EditorFile.makeActive), initial render (applySettings.afterRender), and the setting-change handler (appSettings.js). The setHeight function also carries a redundant guard for safety. Default-value changes affect new installs only. The only observation is that the vendored plugin copy is frozen at 3.3.1 and will need manual updates for future upstream fixes.

No files require special attention. package.json is worth noting because the vendored plugin will not automatically receive upstream updates.

Important Files Changed

Filename Overview
src/components/terminal/terminal.js Four URLs changed from localhost to 127.0.0.1 to fix offline terminal creation — both Cordova HTTP plugin calls and the WebSocket URL use the loopback IP, which does not require DNS resolution.
src/lib/applySettings.js Startup render now checks activeFile?.hideQuickTools before showing the toggler and before restoring quick-tools height; tab-switch enforcement is handled separately in editorFile.js.
src/lib/openFile.js Adds hideQuickTools: true to the EditorFile options for video, image, and audio tabs so the quick-tools bar and toggler are hidden when those files are active.
src/lib/settings.js Default quickTools changed from 2 (two rows) to 1 (compact/single row), floatingButton changed from false to true, and one default quicktoolsItems entry changed from 34 to 5 — affects new installs only.
src/settings/appSettings.js The floatingButton setting-change handler now guards against hideQuickTools on the active file before showing the toggler, matching the behavior added to applySettings.js.
package.json Switches cordova-plugin-advanced-http from the npm registry (^3.3.1) to a locally bundled copy at file:src/plugins/cordova-plugin-advanced-http; the bundled version is 3.3.1, an unmodified copy of the upstream package.
src/pages/welcome/welcome.js Sets hideQuickTools: true on the welcome-tab EditorFile so the quick-tools bar is hidden on the welcome page.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User switches tab] --> B[EditorFile.makeActive called]
    B --> C[switchFile updates editorManager.activeFile]
    C --> D{this.hideQuickTools?}
    D -- Yes\nMedia / Welcome / Page --> E[Add hide class to toggler]
    E --> F[setTimeout 300ms remove toggler from DOM]
    F --> G[actions set-height height:0 save:false]
    D -- No\nNormal editor file --> H{appSettings.floatingButton?}
    H -- true --> I[Remove hide class, re-append toggler]
    H -- false --> J[Leave toggler hidden]
    I --> K[actions set-height height:savedQuickTools save:false]
    J --> K
    K --> L[setHeight checks activeFile.hideQuickTools as safety guard]
    L --> M[Footer height updated]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[User switches tab] --> B[EditorFile.makeActive called]
    B --> C[switchFile updates editorManager.activeFile]
    C --> D{this.hideQuickTools?}
    D -- Yes\nMedia / Welcome / Page --> E[Add hide class to toggler]
    E --> F[setTimeout 300ms remove toggler from DOM]
    F --> G[actions set-height height:0 save:false]
    D -- No\nNormal editor file --> H{appSettings.floatingButton?}
    H -- true --> I[Remove hide class, re-append toggler]
    H -- false --> J[Leave toggler hidden]
    I --> K[actions set-height height:savedQuickTools save:false]
    J --> K
    K --> L[setHeight checks activeFile.hideQuickTools as safety guard]
    L --> M[Footer height updated]
Loading

Reviews (6): Last reviewed commit: "feat(quicktools): hide quicktools on med..." | Re-trigger Greptile

@RohitKushvaha01 RohitKushvaha01 marked this pull request as draft June 25, 2026 02:46
@RohitKushvaha01 RohitKushvaha01 changed the title fix: garbage ux feat: improved ux Jun 25, 2026
@RohitKushvaha01 RohitKushvaha01 marked this pull request as ready for review June 25, 2026 04:15
Comment thread src/lib/applySettings.js
@RohitKushvaha01 RohitKushvaha01 marked this pull request as draft June 25, 2026 06:58
@RohitKushvaha01 RohitKushvaha01 force-pushed the fix_garbage_ux branch 2 times, most recently from b412ac1 to 4aca7e8 Compare June 25, 2026 08:06
@RohitKushvaha01 RohitKushvaha01 marked this pull request as ready for review June 25, 2026 08:18
@RohitKushvaha01 RohitKushvaha01 merged commit 7a04af2 into Acode-Foundation:main Jun 25, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Jun 25, 2026
@RohitKushvaha01 RohitKushvaha01 deleted the fix_garbage_ux branch June 25, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Cannot launch terminal in existing PRoot environment when offline (works online)

1 participant