Document "Not found" bug still unresolved despite all verified fields: - urlId, revisionCount, collaboratorIds, content, editorVersion all correct - Need to check Outline server logs or compare with UI-created document Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
131 lines
3.6 KiB
Markdown
131 lines
3.6 KiB
Markdown
# MCP Outline PostgreSQL - Continuação
|
|
|
|
**Última Sessão:** 2026-02-01
|
|
**Versão Actual:** 1.3.17
|
|
**Estado:** ⚠️ Bug "Not found" por resolver
|
|
|
|
---
|
|
|
|
## Bug Pendente: Documentos "Not found"
|
|
|
|
### Sintoma
|
|
Documentos criados via MCP aparecem na listagem mas ao abrir mostram "Not found".
|
|
|
|
### Investigação Feita (01 Fev)
|
|
|
|
Documento de teste: `https://hub.descomplicar.pt/doc/teste-mermaid-diagrams-c051be722b`
|
|
|
|
**Campos verificados na BD - TODOS CORRECTOS:**
|
|
|
|
| Campo | Valor | Status |
|
|
|-------|-------|--------|
|
|
| `id` | `a2321367-0bf8-4225-bdf9-c99769912442` | ✅ UUID válido |
|
|
| `urlId` | `c051be722b` | ✅ 10 chars |
|
|
| `revisionCount` | `1` | ✅ |
|
|
| `collaboratorIds` | `[userId]` | ✅ Array preenchido |
|
|
| `publishedAt` | `2026-02-01T13:03:58.198Z` | ✅ Definido |
|
|
| `teamId` | `c3b7d636-5106-463c-9000-5b154431f18f` | ✅ |
|
|
| `content` | ProseMirror JSON válido | ✅ 15 nodes |
|
|
| `editorVersion` | `15.0.0` | ✅ Adicionado |
|
|
| `revisions` | 1 entrada | ✅ |
|
|
| `documentStructure` | Incluído na collection | ✅ |
|
|
|
|
**Comparação com documento funcional:**
|
|
- Único campo diferente era `editorVersion` (null vs 15.0.0)
|
|
- Corrigido para `15.0.0` - MAS continua a falhar
|
|
|
|
### Próximos Passos de Debug
|
|
|
|
1. **Verificar logs do Outline** - Pode haver erro específico no servidor
|
|
2. **Comparar TODOS os campos** - Pode haver campo não verificado
|
|
3. **Testar criar documento via UI** - Comparar inserção completa
|
|
4. **Verificar Redis/cache** - Outline pode usar cache
|
|
|
|
### Código Adicionado (v1.3.16-1.3.17)
|
|
|
|
```typescript
|
|
// src/tools/documents.ts - Campos adicionados ao INSERT:
|
|
- editorVersion: '15.0.0'
|
|
- content: ProseMirror JSON (via markdownToProseMirror)
|
|
- collaboratorIds: ARRAY[userId]
|
|
- revisionCount: 1
|
|
|
|
// src/utils/markdown-to-prosemirror.ts - Novo conversor:
|
|
- Headings, paragraphs, lists
|
|
- Checkboxes (checkbox_list, checkbox_item)
|
|
- Tables (table, tr, th, td) - v1.3.16
|
|
- Code blocks, blockquotes, hr
|
|
- Inline: strong, em, code_inline, link
|
|
```
|
|
|
|
---
|
|
|
|
## Versões Recentes
|
|
|
|
| Versão | Data | Alteração |
|
|
|--------|------|-----------|
|
|
| 1.3.17 | 01-02 | Fix editorVersion (não resolveu) |
|
|
| 1.3.16 | 01-02 | Suporte tabelas no conversor |
|
|
| 1.3.15 | 31-01 | Fix mark types (strong/em) |
|
|
| 1.3.14 | 31-01 | Conversor Markdown→ProseMirror |
|
|
| 1.3.13 | 31-01 | Fix revisionCount + content |
|
|
|
|
---
|
|
|
|
## IDs Úteis
|
|
|
|
| Recurso | ID |
|
|
|---------|-----|
|
|
| Team | `c3b7d636-5106-463c-9000-5b154431f18f` |
|
|
| User | `e46960fd-ac44-4d32-a3c1-bcc10ac75afe` |
|
|
| Collection Teste | `27927cb9-8e09-4193-98b0-3e23f08afa38` |
|
|
| Doc problemático | `a2321367-0bf8-4225-bdf9-c99769912442` |
|
|
|
|
---
|
|
|
|
## Comandos
|
|
|
|
```bash
|
|
# Build
|
|
npm run build
|
|
|
|
# Testes
|
|
npm test
|
|
|
|
# Túnel
|
|
./start-tunnel.sh status
|
|
|
|
# Query BD via Node
|
|
DATABASE_URL="postgres://postgres:9817e213507113fe607d@localhost:5433/descomplicar" node -e "
|
|
const { Pool } = require('pg');
|
|
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
|
|
pool.query('SELECT * FROM documents WHERE id = \\'ID\\'').then(console.log);
|
|
"
|
|
```
|
|
|
|
---
|
|
|
|
## Prompt Para Continuar
|
|
|
|
```
|
|
Continuo debug do MCP Outline PostgreSQL.
|
|
|
|
Path: /home/ealmeida/mcp-servers/mcp-outline-postgresql
|
|
Versão: 1.3.17
|
|
|
|
BUG PENDENTE: Documentos criados via MCP mostram "Not found" ao abrir.
|
|
- Documento teste: a2321367-0bf8-4225-bdf9-c99769912442
|
|
- URL: hub.descomplicar.pt/doc/teste-mermaid-diagrams-c051be722b
|
|
- Todos os campos verificados parecem correctos
|
|
- editorVersion já foi corrigido para 15.0.0
|
|
|
|
PRÓXIMO PASSO: Verificar logs do servidor Outline ou comparar
|
|
inserção completa com documento criado via UI.
|
|
|
|
Ver CONTINUE.md para detalhes da investigação.
|
|
```
|
|
|
|
---
|
|
|
|
*Actualizado: 2026-02-01 ~14:30*
|