M3.3: engine wiring for Phpactor and diagnostics
- One Phpactor per open project on its own session thread, started when the toolchain is ready; ordered document sync from buffer.edit and the pump; lspStatus, diagnosticsChanged, diagnostics.list, lsp.status, lsp.restart; app.quit stops the server synchronously. - Phpactor 2026.06.25.0 on Windows: keep-alive $/lutra/tick (its event loop only runs on stdin input), in-process diagnostics and a polling watcher through initializationOptions (amphp subprocesses fail), 500 ms shutdown timeout. - Editor lint extension (underlines, gutter dots, hover; tokens only) and a Problems tab in the bottom panel; problems.open Mod+Alt+P. - Tests: engine tests against the fake server (incl. sync proptest), an ignored real-Phpactor test, a TCP test, Vitest for lint and Problems. - Docs: architecture, gaps G6, parity (Inspections 4% est.), ui-parity, roadmap, ROADMAP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
65c6966588
commit
13c76d3046
34 changed files with 3562 additions and 37 deletions
|
|
@ -15,14 +15,16 @@
|
|||
* `view.toggleStructure` (`Mod+2`): each shows its tool window, or hides
|
||||
* the left window when that tool window is already shown.
|
||||
*
|
||||
* The bottom panel ({@link BottomPanel}) holds the Find and Terminal tool
|
||||
* windows, as tabs in its header while both are shown. Find appears with
|
||||
* the UI command `find.open` (`Mod+Alt+F`), Terminal with `terminal.open`
|
||||
* (`Mod+Shift+T`, M3.6); both are supplied here so they work before the
|
||||
* panel exists, and each makes its tool window the active tab. The panel
|
||||
* collapses to its header; closing it hides the active tool window (the
|
||||
* other one, if shown, becomes active). The Find store keeps the results
|
||||
* and the Terminal store the running terminals while they are hidden.
|
||||
* The bottom panel ({@link BottomPanel}) holds the Find, Terminal and
|
||||
* Problems tool windows, as tabs in its header while more than one is
|
||||
* shown. Find appears with the UI command `find.open` (`Mod+Alt+F`),
|
||||
* Terminal with `terminal.open` (`Mod+Shift+T`, M3.6), Problems with
|
||||
* `problems.open` (`Mod+Alt+P`, M3.3); all are supplied here so they work
|
||||
* before the panel exists, and each makes its tool window the active tab.
|
||||
* The panel collapses to its header; closing it hides the active tool
|
||||
* window (another shown one becomes active). The Find store keeps the
|
||||
* results, the Terminal store the running terminals and the Problems store
|
||||
* the diagnostics while they are hidden.
|
||||
*
|
||||
* A slim header bar along the top (M3.9) holds the app menu
|
||||
* ({@link AppMenu}); its `header` slot can replace it.
|
||||
|
|
@ -35,6 +37,8 @@ import { useFindStore } from "../../stores/find";
|
|||
import { useTerminalStore } from "../../stores/terminal";
|
||||
import FindToolWindow from "../find/FindToolWindow.vue";
|
||||
import TerminalToolWindow from "../terminal/TerminalToolWindow.vue";
|
||||
import ProblemsToolWindow from "../problems/ProblemsToolWindow.vue";
|
||||
import { useProblemsStore } from "../problems/problems";
|
||||
import ProjectToolWindow from "../project/ProjectToolWindow.vue";
|
||||
import StatusBar from "../StatusBar.vue";
|
||||
import StructureToolWindow from "../structure/StructureToolWindow.vue";
|
||||
|
|
@ -79,9 +83,10 @@ function toggleLeft(tool: LeftTool): void {
|
|||
const commands = useCommandsStore();
|
||||
const find = useFindStore();
|
||||
const terminal = useTerminalStore();
|
||||
const problems = useProblemsStore();
|
||||
|
||||
/** Tool windows of the bottom panel. */
|
||||
type BottomTool = "find" | "terminal";
|
||||
type BottomTool = "find" | "terminal" | "problems";
|
||||
/** The bottom tool window last chosen. */
|
||||
const bottomTool = ref<BottomTool>("find");
|
||||
/** Bottom tool windows that are shown, in tab order. */
|
||||
|
|
@ -89,6 +94,7 @@ const bottomTools = computed(() => {
|
|||
const tools: { id: BottomTool; title: string }[] = [];
|
||||
if (find.visible) tools.push({ id: "find", title: t("find.toolWindow.title") });
|
||||
if (terminal.visible) tools.push({ id: "terminal", title: t("terminal.toolWindow.title") });
|
||||
if (problems.visible) tools.push({ id: "problems", title: t("problems.toolWindow.title") });
|
||||
return tools;
|
||||
});
|
||||
/** The active bottom tool window: the chosen one if shown, else the first. */
|
||||
|
|
@ -96,15 +102,15 @@ const bottomActive = computed<BottomTool | null>(() => {
|
|||
const tools = bottomTools.value;
|
||||
return tools.some((tool) => tool.id === bottomTool.value) ? bottomTool.value : (tools[0]?.id ?? null);
|
||||
});
|
||||
/** The store of the active bottom tool window. */
|
||||
const bottomStore = computed(() =>
|
||||
bottomActive.value === "terminal" ? terminal : bottomActive.value === "problems" ? problems : find,
|
||||
);
|
||||
/** Expansion of the panel, kept per tool window by its store. */
|
||||
const bottomOpen = computed({
|
||||
get: () => (bottomActive.value === "terminal" ? terminal.expanded : find.expanded),
|
||||
get: () => bottomStore.value.expanded,
|
||||
set: (open: boolean) => {
|
||||
if (bottomActive.value === "terminal") {
|
||||
terminal.expanded = open;
|
||||
} else {
|
||||
find.expanded = open;
|
||||
}
|
||||
bottomStore.value.expanded = open;
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -114,18 +120,14 @@ const bottomOpen = computed({
|
|||
* @param id - the tool window id from the panel.
|
||||
*/
|
||||
function chooseBottom(id: string): void {
|
||||
if (id === "find" || id === "terminal") {
|
||||
if (id === "find" || id === "terminal" || id === "problems") {
|
||||
bottomTool.value = id;
|
||||
}
|
||||
}
|
||||
|
||||
/** Hides the active bottom tool window. */
|
||||
function closeBottom(): void {
|
||||
if (bottomActive.value === "terminal") {
|
||||
terminal.hide();
|
||||
} else {
|
||||
find.hide();
|
||||
}
|
||||
bottomStore.value.hide();
|
||||
}
|
||||
|
||||
/** Withdraws the command handlers; filled while mounted. */
|
||||
|
|
@ -134,6 +136,7 @@ let withdraw: (() => void)[] = [];
|
|||
onMounted(() => {
|
||||
find.start();
|
||||
terminal.start();
|
||||
problems.start();
|
||||
withdraw = [
|
||||
commands.provide("view.toggleProjectTree", {
|
||||
run: () => {
|
||||
|
|
@ -153,6 +156,12 @@ onMounted(() => {
|
|||
},
|
||||
enabled: () => commands.isEnabled("terminal.create"),
|
||||
}),
|
||||
commands.provide("problems.open", {
|
||||
run: () => {
|
||||
bottomTool.value = "problems";
|
||||
problems.open();
|
||||
},
|
||||
}),
|
||||
commands.provide("view.toggleStructure", {
|
||||
run: () => {
|
||||
toggleLeft("structure");
|
||||
|
|
@ -168,6 +177,7 @@ onBeforeUnmount(() => {
|
|||
withdraw = [];
|
||||
find.stop();
|
||||
terminal.stop();
|
||||
problems.stop();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -239,6 +249,7 @@ onBeforeUnmount(() => {
|
|||
v-if="terminal.visible"
|
||||
v-show="bottomActive === 'terminal'"
|
||||
/>
|
||||
<ProblemsToolWindow v-show="bottomActive === 'problems'" />
|
||||
</BottomPanel>
|
||||
<StatusBar />
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue