Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a68a58f
fix(app): un solo menú abierto entre Nuevo y la barra de menús
whiterdev Nov 27, 2026
cf6b8a9
docs: diseño de aviso de actualización y editor inteligente
whiterdev Nov 27, 2026
651d662
docs: planes de aviso de actualización y editor inteligente
whiterdev Nov 27, 2026
3ab9891
feat(app): WAL-118 ícono de actualización en la barra superior
whiterdev Nov 27, 2026
9027a3f
feat(app): WAL-119 analizador de símbolos PL/SQL
whiterdev Nov 27, 2026
ca171ea
feat(app): WAL-119 camino de nombre de hasta tres partes
whiterdev Nov 27, 2026
042b1c8
feat(app): WAL-119 fuentes de símbolos con caché por conexión
whiterdev Nov 27, 2026
ec99858
feat(app): WAL-119 resolución de nombres con campos y columnas
whiterdev Nov 27, 2026
0b7c568
feat(app): WAL-119 ficha de símbolo al pasar el mouse
whiterdev Nov 27, 2026
e43cf69
feat(app): WAL-119 ir a definición, declaración e implementación; Ctr…
whiterdev Nov 27, 2026
aebbdfe
feat(app): WAL-119 ficha y navegación en ventanas SQL y de prueba
whiterdev Nov 27, 2026
0547039
docs: WAL-119 editor inteligente
whiterdev Nov 27, 2026
63b66d9
fix(app): WAL-119 correcciones de la revisión del editor inteligente
whiterdev Nov 27, 2026
cd2d91b
perf(app): WAL-121 análisis de símbolos sin reparsear
whiterdev Nov 27, 2026
e21a121
test(app): WAL-121 rendimiento medido por parseos, no por tiempo
whiterdev Nov 27, 2026
87126c8
fix(app): WAL-121 F12 no navega si el usuario siguió escribiendo o ca…
whiterdev Nov 27, 2026
a28848c
fix(app): WAL-121 Alt+clic agrega cursor; Ctrl+clic sin destino ubica…
whiterdev Nov 27, 2026
1f17947
fix(app): WAL-121 fuente envuelta muestra Fuente no disponible
whiterdev Nov 27, 2026
3f75219
fix(app): WAL-121 un programa que recibe su objeto después registra s…
whiterdev Nov 27, 2026
3c40ba8
fix(app): WAL-121 dentro de un SELECT el alias gana a una variable
whiterdev Nov 27, 2026
3b0cd17
feat(app): WAL-121 pkg.cursor%ROWTYPE y atributos y métodos de tipos …
whiterdev Nov 27, 2026
f7bbd47
fix(app): WAL-118 buscar sin versión nueva quita el ícono; acento al …
whiterdev Nov 27, 2026
71a80a0
fix(app): WAL-121 correcciones de la segunda revisión
whiterdev Nov 27, 2026
803ecf3
fix(app): WAL-121 un PRAGMA en AS OBJECT no es atributo
whiterdev Nov 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "2"
members = ["crates/openpl-oracle", "crates/openpl-core", "app/src-tauri"]

[workspace.package]
version = "1.0.0-beta.7"
version = "1.0.0-beta.8"
edition = "2021"
license = "Apache-2.0 OR MIT"

Expand Down
32 changes: 32 additions & 0 deletions anti-slop/audit-editor-inteligente-2026-11-27.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Auditoría antislop del editor inteligente

Alcance: ficha de símbolo (`SymbolCard`, `.cm-symbol-tooltip`), subrayado de Ctrl+clic
(`.cm-symbol-link`) y los ítems nuevos del menú contextual. Skills: `antislop`, `antislop-ui`,
`antislop-human`.

- **PASS, contraste de texto.** Medido con `contrast.ts` sobre `--s1`, fondo de la ficha:

| Tema | `--text` | `--muted` |
|---|---|---|
| grafito | 9.83 | 6.35 |
| papel | 11.66 | 5.66 |
| medianoche | 11.83 | 7.30 |
| bosque | 10.84 | 6.90 |
| alto-contraste | 19.80 | 13.62 |

- **PASS con nota, borde.** `--line2` sobre `--s1` queda entre 1.32 y 1.46 (4.61 en alto
contraste). Es el mismo borde de menús y diálogos de la app; la ficha además lleva sombra. No es
un control: no aplica el mínimo de 3:1 de componentes.
- **PASS, tokens.** Sin colores nuevos: `--s1`, `--line`, `--line2`, `--text`, `--muted`,
`--font-code`. IBM Plex Mono para firmas y tipos.
- **PASS, teclado.** La ficha se abre sin mouse con Ctrl+Shift+Espacio y se cierra con Esc. Los
tres comandos de navegación tienen atajo en `keymap.ts` y aparecen en el menú contextual con su
atajo.
- **PASS, no tapa la escritura.** La ficha se abre arriba del nombre, se cierra al escribir o
mover el cursor y no toma el foco.
- **PASS, estados.** Sin resultado no hay ficha. Fuente no legible: "Fuente no disponible". Sin
cuerpo: "Cuerpo no disponible". Sin conexión: solo lo local, nunca queda cargando.
- **PASS, copia.** Textos cortos en español: "Sin valor inicial", "Expresión", "Columna",
"N columnas más", nombres de los comandos.
- **Pendiente, escritorio.** Probar en la app real: pasar el puntero sobre una constante de un
paquete, Ctrl+clic en una llamada a otro paquete y F12 sobre una tabla en una ventana SQL.
4 changes: 2 additions & 2 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openpl",
"private": true,
"version": "1.0.0-beta.7",
"version": "1.0.0-beta.8",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion app/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "OpenPL",
"version": "1.0.0-beta.7",
"version": "1.0.0-beta.8",
"identifier": "org.openpl.app",
"build": {
"beforeDevCommand": "npm run dev",
Expand Down
17 changes: 17 additions & 0 deletions app/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,20 @@
justify-content: flex-end;
gap: 8px;
}

.update-badge {
color: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
.update-badge {
animation: update-bounce 600ms ease-out 3;
}
}
@keyframes update-bounce {
0%, 100% { transform: translateY(0); }
40% { transform: translateY(-4px); }
70% { transform: translateY(1px); }
}
.update-badge:hover:not(:disabled) {
color: var(--accent);
}
126 changes: 126 additions & 0 deletions app/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ vi.mock("./api", () => ({
sessionPing: vi.fn(async () => true),
listObjects: vi.fn(),
programSource: vi.fn(),
editorObject: vi.fn(async () => null),
describeColumns: vi.fn(async () => []),
routineOverloads: vi.fn(),
completeObjects: vi.fn(),
objectColumns: vi.fn(),
Expand Down Expand Up @@ -1210,3 +1212,127 @@ test("Ayuda > Buscar actualizaciones avisa si está al día o si falla", async (
await checkUpdatesFromMenu();
expect(await screen.findByRole("alert")).toHaveTextContent("No se pudo buscar actualizaciones");
});

test("Abrir un menú de la barra cierra Nuevo", async () => {
windowEvents.close.mockResolvedValue(() => {});
render(<App />);
fireEvent.click(await screen.findByRole("button", { name: "Cancelar" }));
fireEvent.click(screen.getByRole("button", { name: "Nuevo" }));
const archivo = screen.getByRole("button", { name: "Archivo" });
fireEvent.mouseDown(archivo); fireEvent.click(archivo);
expect(screen.queryByRole("menu", { name: "Archivo" })).toBeInTheDocument();
expect(screen.queryByRole("menu", { name: "Nuevo" })).not.toBeInTheDocument();
});
test("Abrir Nuevo cierra el menú de la barra", async () => {
windowEvents.close.mockResolvedValue(() => {});
render(<App />);
fireEvent.click(await screen.findByRole("button", { name: "Cancelar" }));
fireEvent.click(screen.getByRole("button", { name: "Archivo" }));
const nuevo = screen.getByRole("button", { name: "Nuevo" });
fireEvent.mouseDown(nuevo); fireEvent.click(nuevo);
expect(screen.queryByRole("menu", { name: "Nuevo" })).toBeInTheDocument();
expect(screen.queryByRole("menu", { name: "Archivo" })).not.toBeInTheDocument();
});
test("Alt cierra Nuevo al abrir la barra", async () => {
windowEvents.close.mockResolvedValue(() => {});
render(<App />);
fireEvent.click(await screen.findByRole("button", { name: "Cancelar" }));
fireEvent.click(screen.getByRole("button", { name: "Nuevo" }));
fireEvent.keyDown(document, { key: "Alt" }); fireEvent.keyUp(document, { key: "Alt" });
expect(screen.queryByRole("menu", { name: "Nuevo" })).not.toBeInTheDocument();
});

test("una actualización encontrada deja el ícono tras Más tarde", async () => {
windowEvents.close.mockResolvedValue(() => {});
updater.check.mockResolvedValue({ version: "9.9.9", notes: "", install: vi.fn() });
render(<App />);
fireEvent.click(await screen.findByRole("button", { name: "Más tarde" }));
expect(screen.queryByRole("dialog", { name: "OpenPL 9.9.9" })).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Actualización disponible: 9.9.9" }));
expect(screen.getByRole("dialog", { name: "OpenPL 9.9.9" })).toBeInTheDocument();
});

test("sin actualización no hay ícono", async () => {
windowEvents.close.mockResolvedValue(() => {});
render(<App />);
await screen.findByRole("button", { name: "Cancelar" });
expect(screen.queryByRole("button", { name: /Actualización disponible/ })).not.toBeInTheDocument();
});

test("F12 sobre un miembro de otro paquete lo abre en su declaración", async () => {
windowEvents.close.mockResolvedValue(() => {});
vi.mocked(api.programSource).mockReset();
const pkgA = { owner: "HR", name: "PKG_A", object_type: "Package" as const, status: "Valid" as const, last_ddl_time: "2026-01-01T12:00:00" };
const pkgOtro = { ...pkgA, name: "PKG_OTRO" };
vi.mocked(api.listObjects).mockResolvedValue([pkgA]);
const source = "CREATE OR REPLACE PACKAGE PKG_A AS\n c NUMBER := pkg_otro.hacer;\nEND;";
const other = "CREATE OR REPLACE PACKAGE PKG_OTRO AS\n FUNCTION hacer RETURN NUMBER;\nEND;";
vi.mocked(api.programSource).mockImplementation(async (_session, _type, _owner, name) => [
{ kind: "PACKAGE", source: name === "PKG_OTRO" ? other : source, last_ddl_time: null, diagnostics: [] },
]);
vi.mocked(api.editorObject).mockImplementation(async (_session, reference) =>
reference.name === "PKG_OTRO" ? pkgOtro : null);
render(<App />);
await connectAs();
fireEvent.click(await screen.findByRole("treeitem", { name: "Paquetes" }));
fireEvent.contextMenu(await screen.findByRole("treeitem", { name: "PKG_A" }));
fireEvent.click(screen.getByRole("menuitem", { name: "Editar Spec y Body" }));
const editor = await screen.findByRole("textbox", { name: "Spec" });
const view = EditorView.findFromDOM(editor.closest<HTMLElement>(".cm-editor")!)!;
act(() => view.dispatch({ selection: { anchor: source.indexOf("hacer") + 1 } }));
await act(async () => {
fireEvent.keyDown(window, { key: "F12" });
});
await waitFor(() => {
const opened = EditorView.findFromDOM(
screen.getByRole("textbox", { name: "Spec" }).closest<HTMLElement>(".cm-editor")!,
)!;
expect(opened.state.doc.toString()).toBe(other);
expect(opened.state.selection.main.head).toBe(other.indexOf("hacer"));
});
});

test("buscar actualizaciones sin versión nueva quita el ícono que había", async () => {
windowEvents.close.mockResolvedValue(() => {});
updater.check.mockResolvedValueOnce({ version: "9.9.9", notes: "", install: vi.fn() }).mockResolvedValueOnce(null);
render(<App />);
fireEvent.click(await screen.findByRole("button", { name: "Más tarde" }));
expect(screen.getByRole("button", { name: "Actualización disponible: 9.9.9" })).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Ayuda" }));
fireEvent.click(within(screen.getByRole("menu", { name: "Ayuda" })).getByRole("menuitem", { name: /Buscar actualizaciones/ }));
expect(await screen.findByText("Estás al día")).toBeInTheDocument();
expect(screen.queryByRole("button", { name: /Actualización disponible/ })).not.toBeInTheDocument();
});

test("un error al buscar actualizaciones deja el ícono", async () => {
windowEvents.close.mockResolvedValue(() => {});
updater.check.mockResolvedValueOnce({ version: "9.9.9", notes: "", install: vi.fn() }).mockRejectedValueOnce(new Error("red"));
render(<App />);
fireEvent.click(await screen.findByRole("button", { name: "Más tarde" }));
fireEvent.click(screen.getByRole("button", { name: "Ayuda" }));
fireEvent.click(within(screen.getByRole("menu", { name: "Ayuda" })).getByRole("menuitem", { name: /Buscar actualizaciones/ }));
expect(await screen.findByText("No se pudo buscar actualizaciones")).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Actualización disponible: 9.9.9" })).toBeInTheDocument();
});

test("durante la instalación el ícono no abre otro diálogo", async () => {
windowEvents.close.mockResolvedValue(() => {});
updater.check.mockResolvedValue({ version: "9.9.9", notes: "", install: vi.fn(() => new Promise<void>(() => {})) });
render(<App />);
fireEvent.click(await screen.findByRole("button", { name: "Actualizar" }));
expect(await screen.findByRole("status", { name: "" })).toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Actualización disponible: 9.9.9" }));
expect(screen.getAllByRole("dialog", { name: "OpenPL 9.9.9" })).toHaveLength(1);
});

test("un segundo clic en Nuevo lo cierra", async () => {
windowEvents.close.mockResolvedValue(() => {});
render(<App />);
fireEvent.click(await screen.findByRole("button", { name: "Cancelar" }));
const nuevo = screen.getByRole("button", { name: "Nuevo" });
fireEvent.click(nuevo);
expect(screen.getByRole("menu", { name: "Nuevo" })).toBeInTheDocument();
fireEvent.mouseDown(nuevo);
fireEvent.click(nuevo);
expect(screen.queryByRole("menu", { name: "Nuevo" })).not.toBeInTheDocument();
});
Loading
Loading