Skip to content

Commit d7fe017

Browse files
committed
Clean up: Remove outdated comments, dead code, and update documentation for diagram-only CodeLens feature
1 parent ad823c2 commit d7fe017

15 files changed

Lines changed: 64 additions & 481 deletions

.github/chatmodes/plan.chatmode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Comprehensively analyze a problem, perform necessary research, and then formulate a detailed solution plan using Markdown checklists.
3-
tools: ["codebase", "fetch", "search", "terminal", "file_system"]
3+
tools: ["codebase", "fetch", "search"]
44
---
55

66
# Plan Mode

.github/copilot-instructions.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,38 @@
130130
- Do not consider a refactor or feature complete until the build and tests pass.
131131
- When a test fails and the cause is unclear, ask for clarification. Sometimes the source is wrong,
132132
sometimes the test is wrong—ask for help to determine which.
133+
134+
## General Development Guidelines
135+
136+
- **Use Class-Based Registries and Singletons:**
137+
For shared registries or service-like modules, define a class with clear public methods and export
138+
a singleton instance. This approach improves testability, extensibility, and aligns with familiar
139+
patterns from C# and Elixir.
140+
141+
- **Centralize Shared Types and Interfaces:**
142+
Move all shared interfaces and types to a dedicated types file (e.g., `src/types/ash.ts`). Update
143+
all imports to use these centralized definitions, and ensure only the shared types module exports
144+
them.
145+
146+
- **Separate Pure Logic from VS Code Integration:**
147+
Keep parsing, data modeling, and utility logic free of VS Code API dependencies. Place all VS
148+
Code-dependent code (such as providers, commands, and UI) in a dedicated directory (e.g.,
149+
`src/features/`).
150+
151+
- **Define Clear Public and Private APIs:**
152+
Only export public interfaces and functions. Mark helpers and internal functions as private or
153+
leave them unexported.
154+
155+
- **Document Module Boundaries and APIs:**
156+
Add module-level comments describing the public API and intended usage for each module.
157+
158+
- **Maintain and Expand Tests:**
159+
Ensure tests import only public APIs. Add or expand unit tests for pure logic modules, especially
160+
when extracting or refactoring types and interfaces.
161+
162+
- **Keep Documentation Up to Date:**
163+
Revise documentation files to reflect the current structure and conventions after any significant
164+
change.
165+
166+
- **Build and Test After Every Change:**
167+
Run all tests (`npm test`) after any code change. Fix all errors and warnings before proceeding.

README.md

Lines changed: 21 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Ash Studio VS Code Extension
22

3-
Working with Ash Framework projects often means dealing with long resource files, making it hard to find and navigate between sections.
3+
Working with Ash Framework projects often means dealing with long resource files, making it hard to
4+
find and navigate between sections.
45

5-
Ash Studio is a VS Code extension that solves this by providing navigation and code insight tools, helping you quickly jump between Ash DSL blocks and understand your code structure at a glance.
6+
Ash Studio is a VS Code extension that solves this by providing navigation and code insight tools,
7+
helping you quickly jump between Ash DSL blocks and understand your code structure at a glance.
68

79
## ✨ Features
810

911
- **🧭 Smart Navigation** - Jump between Ash sections with document outline integration
1012
- **⚡ Quick Section Search** - Instantly find and navigate to any Ash section via Command Palette
1113
- **📊 Sidebar Overview** - Dedicated panel showing all Ash sections and their hierarchy
12-
- **📚 Documentation Links** - CodeLens provides direct links to Ash documentation for DSL blocks
13-
- **�️ Robust Parsing** - Works reliably with complex Ash files using intelligent fallback
14-
strategies
14+
- **📚 Mermaid Diagram Code Lenses** - CodeLens provides direct viewing of mermaid diagrams
1515

1616
## 📦 Installation
1717

@@ -38,10 +38,20 @@ Ash Studio is a VS Code extension that solves this by providing navigation and c
3838
- **Sidebar Panel**: Look for "Ash Studio" in the Explorer sidebar
3939
- **Document Outline**: View Ash sections in VS Code's Outline panel
4040
- **Quick Navigation**: Use `Cmd+Shift+P` → "Go to Ash Section..."
41+
4. Consider adding some version of this to your .gitignore if you don't want diagrams saved in your
42+
repo.
43+
44+
```gitignore
45+
lib/**/*.mmd
46+
lib/**/*.svg
47+
lib/**/*.png
48+
lib/**/*.pdf
49+
lib/**/*.md
50+
```
4151

4252
## 🎯 Usage
4353

44-
### Navigation and Documentation Features
54+
### Navigation and Diagram Features
4555

4656
**Sidebar Navigation**
4757

@@ -61,11 +71,11 @@ Ash Studio is a VS Code extension that solves this by providing navigation and c
6171
- See all Ash sections as navigable tree structure
6272
- Click to jump to any section
6373

64-
**CodeLens Documentation Links**
74+
**CodeLens Mermaid Diagram Links**
6575

66-
- Enable CodeLens in settings (see Configuration section)
67-
- Hover over DSL blocks like `resource`, `authentication`, etc. to see documentation links
68-
- Click on CodeLens links to open relevant Ash Framework documentation in your browser
76+
- Click on CodeLens links to open the mermaid diagram in a webview. Diagrams will be created using
77+
mix tasks.
78+
- Choose the diagram format in settings.
6979

7080
### Supported Ash Constructs
7181

@@ -92,52 +102,11 @@ The extension also supports DSL blocks from popular Ash libraries:
92102
**Extension not activating?**
93103

94104
- Ensure your `.ex` files contain `use Ash.Resource` or `use Ash.Domain`
95-
- Check that file extensions are `.ex` (not `.exs`)
96-
97-
**Sidebar showing as empty?**
98-
99-
- Open an Ash file (Resource or Domain)
100-
- Check VS Code's Output panel → "Ash Studio" for parsing logs
101-
- Verify the file has recognizable Ash DSL sections
102-
103-
**Performance with large files?**
104-
105-
- The extension automatically uses optimized parsing for complex files
106-
- Large files (>5000 lines) use fast simple parser mode
107-
- No action needed - this is automatic and transparent
108-
109-
**Missing sections in navigation?**
110-
111-
- Complex or malformed DSL blocks may not be recognized
112-
- Check VS Code Output → "Ash Studio" for parsing details
113-
- File an issue with example code if needed
114-
115-
## 🔧 Configuration
116-
117-
Access settings via VS Code Preferences → Extensions → Ash Studio:
118-
119-
- **Log Level**: Control debug output (Error/Warning/Info/Debug)
120-
- **Auto Refresh**: Automatically update sidebar when files change
121-
- **CodeLens**: Enable or disable documentation links in Elixir files
122-
- **Performance**: Enable metrics collection and tune parsing delays
105+
- check the Ash Studio channel in the Output window for errors
123106

124107
## 💬 Support & Feedback
125108

126109
- **Issues**: [GitHub Issues](https://github.com/ketupia/ash-studio-vscode-extension/issues)
127110
- **Feature Requests**: Use GitHub Issues with "enhancement" label
128111
- **Questions**: Start a
129112
[GitHub Discussion](https://github.com/ketupia/ash-studio-vscode-extension/discussions)
130-
131-
## 🏗️ For Developers
132-
133-
Interested in contributing or understanding the architecture? See our comprehensive developer
134-
documentation:
135-
136-
- **[Development Guide](docs/DEVELOPMENT_GUIDE.md)** - Setup, quality standards, and contribution
137-
guidelines
138-
- **[Architecture Overview](docs/ARCHITECTURE.md)** - Technical design and implementation details
139-
- **[Feature Roadmap](docs/feature-plan.md)** - Planned features and development priorities
140-
141-
---
142-
143-
**Made with ❤️ for the Ash Framework community**

REFACTORING_GUIDE.md

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)