Skip to content

Add vscode style ".acode" folder and file structure for settings and extensions. - #3093

Open
codewithchai0605 wants to merge 4 commits into
Acode-Foundation:mainfrom
codewithchai0605:feat/acode-workspace
Open

codewithchai0605 wants to merge 4 commits into
Acode-Foundation:mainfrom
codewithchai0605:feat/acode-workspace

Conversation

@codewithchai0605

Copy link
Copy Markdown
  1. Plugin recommendations.
  2. Project settings

Plugin recommendations.
A project can suggest plugins that suits it. This is only ever a suggestion nothing here installs, enables or runs anything.
it can be used like this, Plugin recommendations: the contents of .acode/extensions.json
{ "recommendations": ["acode.plugin.example"] }

Note: This requires the backend to update the existing search api to also accepts query like "id:plugin.id" like "mode:pluginId".

Project settings:

It allows to change the project level settings without editing their globals settings.

This feature is not implemented completely. It can be improved much.

- Implement tests for workspaceExtensions including validation of plugin IDs, parsing of extension recommendations, and handling of hostile input.
- Introduce tests for workspaceSettings covering project settings allowlist, parsing of project settings, and validation of individual settings like tabSize and formatOnSave.
- Ensure both test files check for frozen results and handle edge cases such as invalid JSON and prototype pollution.
@github-actions github-actions Bot added enhancement New feature or request translations Anything related to Translations Whether a Issue or PR labels Nov 17, 2026
@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 3/5

[Medium impact] The changes affect settings and plugin-review behavior only for projects with a configured `.acode` folder.

Fix Android folder matching and saved editor options before merging.

Findings

  1. P1 Android folders miss project settings ▶
  2. P1 Files restore old indentation ▶

Summary

Adds project configuration through .acode/settings.json and .acode/extensions.json.

  • Acode tracks open project folders that contain a .acode directory.
  • Project settings control indentation and formatting for files in that project.
  • Projects can suggest plugins for users to review in the Extensions sidebar.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Open folder] --> B[Scan .acode]
  C[Save or change configuration files] --> B
  B --> D[Read settings.json]
  B --> E[Read extensions.json]
  D --> F[Apply project editor options]
  D --> G[Resolve formatting settings]
  E --> H[Check installed plugins]
  H --> I[Show recommendations]
  I --> J[User opens plugin search]
Loading

Reviews (6) · Last reviewed commit: "Fix execOperation to call workspace.path..." · Reviewed by Greptile

Comment thread src/lib/editorManager.js Resolved
Comment thread src/lib/workspace.js Resolved
Comment thread tests/unit/projectExtensions.test.js Resolved
@codewithchai0605

Copy link
Copy Markdown
Author

@greptile

Comment thread src/lib/openFolder.js Resolved
@codewithchai0605

Copy link
Copy Markdown
Author

@greptile

1 similar comment
@codewithchai0605

Copy link
Copy Markdown
Author

@greptile

Comment thread src/lib/editorManager.js Resolved
Comment thread src/lib/workspaceSettings.js Resolved
Comment thread src/main.js Resolved
Comment thread src/main.js Resolved
Comment thread src/lib/commands.js Resolved
@codewithchai0605

Copy link
Copy Markdown
Author

@greptile

Comment thread src/lib/workspace.js
if (!url) return null;
let match = null;
for (const workspace of workspaces.values()) {
if (!Url.isSameOrDescendant(url, workspace.url)) continue;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Android folders miss project settings

A folder added through Android's storage picker can have a bare content://…/tree/… root URL, while its files use content://…/tree/…::primary:…/file.js URLs. Url.isSameOrDescendant requires / after the root, so find rejects those files. The project is detected, but its indentation and format-on-save settings never apply.

Normalize both URLs to the same document-path form before comparing them.

Knowledge Base Used: Filesystem and project access

Comment thread src/lib/editorManager.js
for (const pane of panes) {
const file = pane.activeFile;
if (!pane.editor || file?.type !== "editor") continue;
applyOptions(PROJECT_SETTING_KEYS, pane.editor, file);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Files restore old indentation

reapplyProjectOptions changes the editor state without updating file.__cmOptionsSignature. Start with project tabSize: 4, change it to 8 while the file is visible, then switch away. If the project returns to 4 while the file is hidden, reopening it restores the state with 8. Its saved signature still says 4, so applyCurrentEditorOptions skips the update and new edits use the wrong indentation.

Update the saved signature when applying project options, or invalidate it so activation reapplies the current settings.

Knowledge Base Used: Workspace and code editor

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

Labels

enhancement New feature or request translations Anything related to Translations Whether a Issue or PR

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant