✨ Diagnostic Manager
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by locating the editor's Issue Navigator and Line Annotations components, then trace how they currently receive diagnostic data. Define the DiagnosticManager and DiagnosticIssue around the requirements, with updates grouped by file and observable changes; done means both components can use the manager as their shared diagnostic source.
Written by the indexing model from the issue text.
Description
Description
Introduce a DiagnosticManager responsible for managing and publishing diagnostics (e.g., build errors, linter warnings, language server issues) grouped by file. This manager will serve as the single source of truth for diagnostics across the editor, and its contents will drive visual components such as the Issue Navigator and Line Annotations.
Requirements
- Create a
DiagnosticManagerclass conforming toObservableObject - Store diagnostics as a flat list or grouped by file:
@Published var issues: [DiagnosticIssue] - Define a
DiagnosticIssuemodel:struct DiagnosticIssue: Identifiable, Hashable { let id: UUID = UUID() let file: URL let line: Int let column: Int? let message: String let severity: Severity let source: String? let fixItSuggestion: String? enum Severity { case error, warning, info, live } } - Add convenience accessors:
var issuesByFile: [URL: [DiagnosticIssue]] func issues(for file: URL) -> [DiagnosticIssue] - Add a way to update issues by file, e.g.:
func setIssues(_ issues: [DiagnosticIssue], for file: URL) func clearIssues(for file: URL)
Additional Context
This manager will be used by multiple parts of the app, including the Issue Navigator and Line Annotations. It should be reactive and efficient, allowing UI components to automatically update when diagnostics change.
Future extensions may include filtering, debouncing updates, or supporting different diagnostics sources (build system, LSP, etc.).
Related Issues
- Dominant language
- Swift
- Stars
- 23k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CodeEditApp/CodeEdit
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CodeEditApp/CodeEdit#2190 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 15/100
CodeEditApp/CodeEdit#2195 · 7 reactions ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
CodeEditApp/CodeEdit#2185 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
CodeEditApp/CodeEdit#2181 ·
-
creashes on starting Openbug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
CodeEditApp/CodeEdit#2180 ·
All issues in CodeEditApp/CodeEdit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
googleapis/google-cloud-swift#1151 ·
-
`--app` focus through the daemon can pick an off-screen window and refuse with `axElementNotFound` Openclawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P1
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
code health
Difficulty 1/5 Under an hour Newbie friendliness 72/100
apple/coreai-models#288 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100