Skip to content

Add .gitignore and fix several bugs across the app#2

Merged
sonuramashishnpm merged 3 commits into
npmaiecosystem:mainfrom
Mohammad-Faiz-Cloud-Engineer:main
Jul 22, 2026
Merged

Add .gitignore and fix several bugs across the app#2
sonuramashishnpm merged 3 commits into
npmaiecosystem:mainfrom
Mohammad-Faiz-Cloud-Engineer:main

Conversation

@Mohammad-Faiz-Cloud-Engineer

Copy link
Copy Markdown
Contributor

What changed in this update?

New file: .gitignore

A .gitignore file has been added so that unnecessary files like Python cache (pycache), virtual environments, IDE settings, and sensitive user credentials are never uploaded to GitHub. This keeps the repository clean and secure.

Bug fixes

app.py — Fixed button hover effects so mouse events work properly (PulseBtn, GhostBtn, NavBtn). Removed unused code (threading import) and outdated comments. The buttons will now feel more responsive.

app_config.json — Fixed a spelling mistake. The field was written as "annon_key" but it should be "anon_key". This was preventing the Supabase connection from working.

mcp_link.py — The config loading system now tries three places in order: user local file → bundled app_config.json → GitHub. Previously it only tried GitHub, which meant the app could not start without internet. Also fixed the config key names to match the actual JSON format.

requirements.txt — Added two missing packages: cryptography (for encrypting credentials) and requests (for downloading config from GitHub). Without these the app would crash on startup.

Documentation fixes

README.md and Docs/Docs.md — Both files had an incorrect run instruction. They said to run python main.py but that file does not exist. Fixed to the correct command: python Desktop_App/app.py.

Cleanup

Deleted Docs/app.py — it was an empty file with no content, no longer needed.

This update makes several fixes across the project:

1. Add .gitignore — stops Python cache files (__pycache__), virtual
   environments, IDE settings, OS files, and user credentials from
   being uploaded to GitHub. Keeps the repository clean and secure.

2. Fix app.py — removed unused 'threading' import to make code
   cleaner. Fixed mouse hover effects in buttons (PulseBtn, GhostBtn,
   NavBtn) so they work correctly. Removed outdated comments from
   voice input function.

3. Fix app_config.json — corrected a typo in the field name
   'annon_key' to 'anon_key' so the Supabase connection works.

4. Fix mcp_link.py — config loading now tries three places in order:
   the user's local file, the bundled app_config.json, then GitHub.
   Fixed the key names to match the actual config file format.
   Removed unused 'import os'.

5. Fix requirements.txt — added 'cryptography' and 'requests' as
   dependencies so the app does not crash when starting up.

6. Fix run command in docs — corrected both README.md and Docs.md
   from 'python main.py' (which doesn't exist) to the correct
   'python Desktop_App/app.py'.

7. Remove empty file — deleted Docs/app.py which was blank and
   served no purpose.

@sonuramashishnpm sonuramashishnpm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey there are following thinsg which we want in your Pull Request:-

1. In load_config things just do not change anything because the decision of fetching things from GithubUserContent is not just a normal decision instead it can happen where we needed to change the supabase_urls and others frequently because ### NPMAI ECOSYSTEM is Open Source Organisation which relies on 107 Core Contributors.

2. Do not remove Docs/app.py

3. _Do not remove the instructions of voice_input function instead you can place it above the function.

…y config loading

Per maintainer review feedback:
1. Restored Docs/app.py (empty file) as requested.
2. Restored documentation comments above _voice_input() function.
3. Simplified load_config() in mcp_link.py — removed local user config
   override fallback. Now tries bundled app_config.json first, then
   GitHub fetch. Kept the key name fixes (url/anon_key) that match
   the actual JSON structure.

@sonuramashishnpm sonuramashishnpm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Problem in your PR:-

Mr. Faiz Please just use GithubUserContent and i do not think any change is required here try to understand and i know your decision is reasonable but we do not want there anything because you are saying this in the code that first try Bundled config if it works then try githubusercontent so it has no reason if we added the config locally in the client side then why it will fallback to githubusercontent.

Now what you can do:-

You can do that first try GithubUserContent then try local here your all methods will work.

Per maintainer review: try GitHubUserContent first so the open-source
org can push config updates centrally. Bundled app_config.json is only
a fallback when offline.

@sonuramashishnpm sonuramashishnpm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Done

@sonuramashishnpm
sonuramashishnpm merged commit 66c04eb into npmaiecosystem:main Jul 22, 2026
3 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.

2 participants