74 lines
2.7 KiB
Markdown
74 lines
2.7 KiB
Markdown
---
|
|
id: PLN-0114
|
|
ticket: multi-frontend-remove-pbs-branches
|
|
title: Migrate hover and documentation to generic frontend models
|
|
status: done
|
|
created: 2026-07-15
|
|
completed: 2026-07-15
|
|
ref_decisions: [DEC-0042]
|
|
tags: [compiler, compiler-general, compiler-pbs, studio, frontend, coupling, multi-frontend]
|
|
---
|
|
|
|
## Briefing
|
|
|
|
`DEC-0042` requires hover and documentation Markdown to be represented through generic frontend models so LSP does not know PBS semantic or documentation internals.
|
|
|
|
## Objective
|
|
|
|
Migrate LSP hover handling to generic frontend hover models while preserving PBS signature, kind, origin, detail, and Markdown documentation behavior.
|
|
|
|
## Dependencies
|
|
|
|
- Depends on `PLN-0111`.
|
|
- Should run after `PLN-0113` so generic symbol kinds and documentation fields are established.
|
|
|
|
## Scope
|
|
|
|
- Define or finalize generic hover/documentation DTOs.
|
|
- Map `PbsEditorialResolvedSymbol` to generic hover output inside the PBS boundary.
|
|
- Update LSP hover composition to consume generic values.
|
|
- Preserve Markdown output and existing no-symbol fallback.
|
|
|
|
## Non-Goals
|
|
|
|
- Changing the PBS `[Doc]` language feature.
|
|
- Reformatting authored Markdown.
|
|
- Implementing go-to-definition or references.
|
|
- Migrating signature help request handling, except for shared signature DTOs used in hover.
|
|
|
|
## Execution Method
|
|
|
|
1. Inspect `PbsEditorialResolvedSymbol`, `PbsEditorialSignature`, and `formatHoverMarkdown(...)`.
|
|
2. Ensure generic `FrontendHover` can represent:
|
|
- display name;
|
|
- symbol kind;
|
|
- detail;
|
|
- origin;
|
|
- signatures;
|
|
- documentation Markdown.
|
|
3. Add PBS mapping from `PbsEditorialResolvedSymbol` to `FrontendHover` inside the frontend language service.
|
|
4. Update `CompilerLanguageServiceBridge.hover(...)` to call generic hover capability and format generic hover values.
|
|
5. Keep Markdown composition deterministic: signature block, kind/origin metadata, then documentation.
|
|
6. Preserve empty/no-symbol fallback when hover capability is absent.
|
|
|
|
## Acceptance Criteria
|
|
|
|
- LSP hover no longer consumes `PbsEditorialResolvedSymbol`.
|
|
- PBS documentation Markdown appears unchanged in hover.
|
|
- Authored Markdown is not reflowed or reparsed by LSP.
|
|
- Missing capability returns deterministic no-symbol hover behavior.
|
|
|
|
## Tests
|
|
|
|
- PBS hover/editorial tests.
|
|
- LSP hover mapping tests asserting Markdown payloads.
|
|
- Documentation Markdown regression tests from `DEC-0039` coverage.
|
|
- Missing hover capability fallback test.
|
|
|
|
## Affected Artifacts
|
|
|
|
- `prometeu-compiler/prometeu-frontend-api/src/main/java/p/studio/compiler/services/...`
|
|
- `prometeu-compiler/frontends/prometeu-frontend-pbs/src/main/java/p/studio/compiler/PBSFrontendLanguageService.java`
|
|
- `prometeu-lsp/prometeu-lsp-v1/src/main/java/p/studio/lsp/services/compiler/CompilerLanguageServiceBridge.java`
|
|
- Hover-related tests.
|