Skip to content

fix(api): wire open_app_dir and reset_config HTTP routes and frontend API client #68

Done

Description

@mlgitdev

Description

Although Api.open_app_dir() (app/api.py:234) and Api.reset_config() (app/api.py:180) exist on the Python Api class, neither endpoint is registered in app/server.py nor exposed in _api inside web/js/util.js. Buttons in Settings -> Backup & Sync and Settings -> About invoke App.api().open_app_dir() and App.api().reset_config(), which immediately throw TypeError.

References: app/server.py:84-341, web/js/util.js:4-95, web/js/settings.js:675,789,946

Steps to Reproduce

  1. Launch NewsAlerts and open Settings.
  2. Go to Backup & Sync (or About) and click Open App Data Folder / Open Folder.
  3. Go to Backup & Sync, click Restore Factory Defaults, and confirm.
  4. Observe TypeError: App.api(...).open_app_dir is not a function and ⚠️ Reset Error: TypeError: App.api(...).reset_config is not a function.

Expected Behavior

POST /api/open_app_dir and POST /api/reset_config should be registered in app/server.py and wired in web/js/util.js, allowing folder opening and factory reset to succeed cleanly.

Operating System & Version

  • OS: Windows 11 x64 / macOS arm64 / Linux x86_64
  • Version: v2.12.0
  • Display / Scale: Verified via live Chrome CDP (1600x960) & local unit/backend suite

Logs & Additional Context

Live Chrome CDP verified typeof open_app_dir === 'undefined', typeof reset_config === 'undefined', and both routes absent from Bottle app routes.

Activity

  1. self-assigned this
    on Dec 2, 2026
  2. added
    bug
    on Dec 2, 2026
  3. mlgitdev commented on Dec 2, 2026

    @mlgitdev
    OwnerAuthor

    🚀 Resolution In Progress

    A fix for this issue has been implemented and submitted in Pull Request #82 (v2.12.1).

    • Branch: fix/audit-remediation-67
    • PR URL: fix(core): resolve 15 verified audit issues across UI, API, concurrency, audio, and packaging (v2.12.1) #82
    • Summary of Changes: Registered POST /api/open_app_dir, POST /api/reset_config, and GET /api/version in app/server.py, and exposed open_app_dir() / reset_config() on _api in web/js/util.js. Verified via unit tests (tests/test_audit_fixes.py) and live Chrome CDP.
    • Verification: compileall clean, 84/84 unit tests passing (including tests/test_audit_fixes.py), and live Chrome CDP verification passed.

    This issue will automatically close upon PR #82 review and merge into main.

  4. github-actions commented on Dec 2, 2026

    @github-actions

    ✅ Issue Validation Passed

    • Conventional Commit title syntax (fix(api))
    • Verified issue type: BUG
    • Required template sections present and filled out

    This issue is well-structured and ready for work according to the Issue-First Protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions