fix: v1.1 Quality Hardening — Phase 1-3 dashboard fixes#28
Conversation
- T030: App.vue min-h-screen → h-screen (fix Graph flex height chain) - T031: GraphView graphContainer v-show guard (hide when no data) - T032: ValidateProjectName regex allows backslash+colon (Windows paths) - T033: SystemView Vector Metrics grid alignment + Latency Percentiles label - T034: Vault Reveal 409 → user-friendly key mismatch error message - T035: Maintenance buttons with tooltips + description paragraph - T036: Remove phantom analytics metrics (Cache Hits, Latency Breakdown) - T037: Replace Queue Depth (always 0) with Observations count
…trimmed count T016: Changed matchedObservations from budgetObs.length (post-trim, ~10) to safeObservations.length (raw API results after credential filtering). Badge now shows true number of memories that matched the search query.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughОбновлены валидация имён проектов, подсчёт совпадений наблюдений при инициализации сессии, заменено свойство StatsCards, а также внесены несколько правок UI‑раскладки и отображения ошибок в компонентах интерфейса. Изменения
Оценка затрат на проверку кода🎯 3 (Moderate) | ⏱️ ~20 minutes Возможно связанные PR
Стихотворение
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request delivers a series of quality hardening fixes for version 1.1, primarily focusing on improving the user experience and reliability of the application's dashboards and core functionalities. It resolves various UI/UX inconsistencies, enhances error reporting, and refines data presentation, making the application more robust and user-friendly. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
@coderabbitai review |
|
@gemini-code-assist review |
✅ Actions performedReview triggered.
|
|
@codex review |
There was a problem hiding this comment.
Code Review
This pull request introduces several changes across the codebase. The projectNamePattern regex was updated to support Windows paths by including backslashes and colons. In the user-prompt.js hook, matchedCount is now used for matchedObservations during session initialization, and comments were added to clarify observation tracking. UI updates include changing the authenticated layout to h-screen, refactoring StatsCards.vue and HomeView.vue to use observationCount instead of queueDepth and updating status logic to isProcessing, and simplifying the AnalyticsView by removing cache hits and latency breakdown sections. Error handling in useVault.ts was enhanced to provide more specific messages for decryption failures. The GraphView now conditionally displays the graph container, and the SystemView received minor layout adjustments and added descriptive tooltips for maintenance actions. Additionally, the VaultView's error message styling was updated.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/worker/middleware.go (1)
471-472:⚠️ Potential issue | 🟡 MinorСообщение об ошибке не соответствует обновлённому regex.
После добавления поддержки двоеточия и обратного слеша сообщение об ошибке устарело и вводит пользователя в заблуждение.
📝 Предлагаемое исправление
// Check for valid characters if !projectNamePattern.MatchString(project) { - return fmt.Errorf("invalid project name: only alphanumeric, underscore, dash, dot, and slash allowed") + return fmt.Errorf("invalid project name: only alphanumeric, underscore, dash, dot, slash, colon, and backslash allowed") }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@internal/worker/middleware.go` around lines 471 - 472, Ошибка говорит об устаревшем списке разрешённых символов — после изменения projectNamePattern он теперь разрешает двоеточие и обратный слеш; обновите сообщение об ошибке в том условии, где проверяется !projectNamePattern.MatchString(project) (внутри middleware.go), заменив текущую строку fmt.Errorf("invalid project name: only alphanumeric, underscore, dash, dot, and slash allowed") на текст, который включает двоеточие и backslash (например: "invalid project name: only alphanumeric, underscore, dash, dot, slash, colon and backslash allowed") чтобы оно отражало текущий regex.
🧹 Nitpick comments (1)
ui/src/composables/useVault.ts (1)
59-64: Нормализуйте проверку ошибки дешифрования, чтобы не терять 409-кейсы.На Line 60 матчинг хрупкий:
includes(...)чувствителен к регистру иincludes('409')может дать ложные срабатывания. Лучше нормализовать строку и использовать более точный паттерн.Предлагаемый патч
- const msg = err instanceof Error ? err.message : '' - if (msg.includes('409') || msg.includes('key mismatch') || msg.includes('encryption') || msg.includes('decrypt')) { + const msg = err instanceof Error ? err.message : '' + const normalized = msg.toLowerCase() + const isDecryptMismatch = + /\b409\b/.test(normalized) || + normalized.includes('key mismatch') || + normalized.includes('encryption') || + normalized.includes('decrypt') + if (isDecryptMismatch) { actionError.value = 'Cannot decrypt: this credential was encrypted with a different vault key. Set the original ENGRAM_VAULT_KEY to reveal it.' } else { actionError.value = msg || 'Failed to reveal credential' }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ui/src/composables/useVault.ts` around lines 59 - 64, The current error check in useVault.ts uses a fragile includes-based match on msg which is case-sensitive and can false-match the substring "409"; update the logic that sets actionError.value to normalize and more precisely detect a decryption / conflict error by lowercasing the message and using a stricter pattern (e.g., regex boundaries or explicit numeric check) and also check structured error fields on err (such as err.status or err.code) before falling back to the message; adjust the block around the msg variable and the actionError.value assignment so it reliably detects HTTP 409/conflict and decryption-related strings (case-insensitive) without accidental matches.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@plugin/engram/hooks/user-prompt.js`:
- Around line 149-153: The ReferenceError happens because matchedCount is
declared with const inside the if (safeObservations.length > 0) block but
referenced later in the /api/sessions/init handler; fix by lifting matchedCount
to the outer scope used by the handler (declare let matchedCount = 0 before the
if) and remove the inner const matchedCount declaration so the assignment inside
the block becomes matchedCount = safeObservations.length; ensure the outer
variable is in the same scope as the later usage and initialized to a safe
default.
- Line 218: Initialize matchedCount at the top of the surrounding function
(e.g., alongside other locals) with let matchedCount = 0; so it's always defined
even when safeObservations is empty, then keep the existing reassignment inside
the if (safeObservations.length > 0) block so matchedCount is updated when
results exist; this ensures the matchedObservations: matchedCount usage does not
raise a ReferenceError.
---
Outside diff comments:
In `@internal/worker/middleware.go`:
- Around line 471-472: Ошибка говорит об устаревшем списке разрешённых символов
— после изменения projectNamePattern он теперь разрешает двоеточие и обратный
слеш; обновите сообщение об ошибке в том условии, где проверяется
!projectNamePattern.MatchString(project) (внутри middleware.go), заменив текущую
строку fmt.Errorf("invalid project name: only alphanumeric, underscore, dash,
dot, and slash allowed") на текст, который включает двоеточие и backslash
(например: "invalid project name: only alphanumeric, underscore, dash, dot,
slash, colon and backslash allowed") чтобы оно отражало текущий regex.
---
Nitpick comments:
In `@ui/src/composables/useVault.ts`:
- Around line 59-64: The current error check in useVault.ts uses a fragile
includes-based match on msg which is case-sensitive and can false-match the
substring "409"; update the logic that sets actionError.value to normalize and
more precisely detect a decryption / conflict error by lowercasing the message
and using a stricter pattern (e.g., regex boundaries or explicit numeric check)
and also check structured error fields on err (such as err.status or err.code)
before falling back to the message; adjust the block around the msg variable and
the actionError.value assignment so it reliably detects HTTP 409/conflict and
decryption-related strings (case-insensitive) without accidental matches.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 08e7a8cc-0fa2-49e0-a3b4-bb3ac0d830c2
📒 Files selected for processing (10)
internal/worker/middleware.goplugin/engram/hooks/user-prompt.jsui/src/App.vueui/src/components/StatsCards.vueui/src/composables/useVault.tsui/src/views/AnalyticsView.vueui/src/views/GraphView.vueui/src/views/HomeView.vueui/src/views/SystemView.vueui/src/views/VaultView.vue
There was a problem hiding this comment.
Code Review
This pull request introduces several UI/UX improvements, data display adjustments, and error handling enhancements across the application. Key changes include expanding the allowed characters for project names in internal/worker/middleware.go, clarifying observation counts in user-prompt.js by distinguishing between raw matched results and post-trim observations, and refining the authenticated layout height in App.vue. The StatsCards component was updated to display "Observations" instead of "Queue Depth" and now uses an isProcessing flag for status. The analytics view was streamlined by removing the "Cache Hits" metric and the "Latency Breakdown" section, and the terminology for "search misses" was updated. Error messages for vault credential revelation were made more specific to guide users on key mismatches, and the graph view now conditionally displays based on data availability. Additionally, the system view received layout adjustments for latency metrics and improved descriptive tooltips for maintenance actions, while the HomeView was refactored to remove unused SSE dependencies.
I am having trouble creating individual review comments. Click here to see my feedback.
plugin/engram/hooks/user-prompt.js (149-152)
The addition of comments explaining observationCount and matchedCount significantly improves code clarity and maintainability. It clearly distinguishes between the post-trim and pre-trim counts, which is crucial for understanding the logic.
ui/src/views/AnalyticsView.vue (112-115)
Removing the 'Cache Hits' metric is a good cleanup, especially if it was never populated. This simplifies the analytics view and removes potentially misleading or irrelevant information, as noted in the summary.
ui/src/views/AnalyticsView.vue (130-155)
The removal of the 'Latency Breakdown' section further streamlines the analytics view. If this data was not being populated or was deemed unnecessary, its removal reduces visual clutter and focuses the dashboard on more relevant metrics.
ui/src/views/HomeView.vue (2-8)
Removing the useSSE import and queueDepth variable from HomeView.vue is a logical refactoring, as the StatsCards component now directly uses isProcessing from its stats prop. This simplifies the HomeView component by removing unused dependencies.
…ation - Lift matchedCount to outer scope (was const inside if block, used outside) - Normalize vault error check: case-insensitive + word boundary for 409
🤖 PR Review MCP State (auto-managed, do not edit){
"version": 2,
"parentChildren": {},
"resolvedNitpicks": {
"coderabbit-nitpick-335390b1-59": {
"resolvedAt": "2026-03-20T11:54:04.183Z",
"resolvedBy": "agent"
},
"coderabbit-outside-diff-48733e21-59": {
"resolvedAt": "2026-03-20T11:54:06.693Z",
"resolvedBy": "agent"
}
},
"updatedAt": "2026-03-20T11:54:07.281Z"
} |
Summary
Changes
App.vue:min-h-screen→h-screen(fixes Graph flex height chain)middleware.go: regex allows backslash + colon for Windows pathsSystemView.vue: unified grid + Latency Percentiles label + Maintenance tooltipsVaultView.vue+useVault.ts: user-friendly 409 key mismatch messageAnalyticsView.vue: removed Cache Hits + Latency Breakdown (never populated)HomeView.vue+StatsCards.vue: Queue Depth → Observations countGraphView.vue: v-show guard on graph containeruser-prompt.js: badge shows raw match count, not token-budget-trimmedTest plan
Summary by CodeRabbit
Новые функции
Улучшения
UI/UX