feat(assistant): show bounded skill activity receipts - #309
Conversation
|
Warning Review limit reached
Next review available in: 47 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe change adds transient, sanitized Skill title and ordinal metadata to assistant activity events. The API forwards the metadata. The browser reduces events into receipt cards and keeps waiting state active until visible answer text appears. ChangesSkill activity pipeline
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SkillTool
participant ActivityStream
participant AssistantPage
participant SkillReceipt
SkillTool->>ActivityStream: emit activation and resource metadata
ActivityStream->>AssistantPage: deliver activity events
AssistantPage->>AssistantPage: validate and reduce receipts
AssistantPage->>SkillReceipt: render Skill progress
AssistantPage->>AssistantPage: settle after visible answer text
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
TegamiThis repository uses Tegami to manage releases. When your changes affect published packages, add a changelog file under Create a changelog → · Changelog format Release preview
Changelogs in this PR
Run Managed by Tegami. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/features/assistant/components/assistant-page.tsx`:
- Around line 536-546: Update the empty-finish branch in the onFinish callback
to also call setSkillReceipts([]), matching the abort and error branches so no
active receipt remains when there is no visible assistant output. Extend the
empty-finish browser test with a named skill activation and assert that no skill
receipt is rendered.
In `@core/src/main/java/com/orgmemory/core/assistant/AssistantAgentActivity.java`:
- Around line 39-55: Update sanitizeTitle to treat Unicode space separators as
whitespace by including Character.isSpaceChar(codePoint) alongside
Character.isWhitespace before blank validation, ensuring NBSP-only titles become
blank and are rejected. Add a regression test covering a title containing
U+00A0.
In
`@integrations/ai-model-gateways/src/main/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacks.java`:
- Around line 102-105: Ensure the activation completion emitted by the
activate_skill callback is observed before resource updates for the same
skillOrdinal are applied, preventing reduceSkillReceipts from dropping updates
while the receipt is ACTIVE or lacks a title. Update the callback/activity
handling around tracker.activated and the SKILL_ACTIVATION COMPLETE emit, using
per-ordinal serialization or pending updates until completion, and add a
concurrent tool callback test covering overlapping activation and
read_skill_resource callbacks.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f70dfb3c-321e-4231-83af-e176f7327be2
⛔ Files ignored due to path filters (9)
docs/decisions/0033-bounded-successful-skill-activity-receipts.mdis excluded by!docs/**docs/increments/completed/2026-08-06-assistant-skill-activity-receipt/challenge-brief.mdis excluded by!docs/**docs/increments/completed/2026-08-06-assistant-skill-activity-receipt/challenge-verdict.mdis excluded by!docs/**docs/increments/completed/2026-08-06-assistant-skill-activity-receipt/design.mdis excluded by!docs/**docs/increments/completed/2026-08-06-assistant-skill-activity-receipt/plan.mdis excluded by!docs/**docs/increments/completed/2026-08-06-assistant-skill-activity-receipt/verification.mdis excluded by!docs/**docs/roadmap.mdis excluded by!docs/**docs/specs/domains/assistant-and-mcp.mdis excluded by!docs/**docs/tests/domains/assistant-and-mcp.mdis excluded by!docs/**
📒 Files selected for processing (15)
ARCHITECTURE.mdapps/api/src/main/java/com/orgmemory/api/assistant/AssistantController.javaapps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.javaapps/api/src/main/java/com/orgmemory/api/assistant/UiMessageStream.javaapps/api/src/test/java/com/orgmemory/api/assistant/UiMessageStreamTests.javaapps/web/src/features/assistant/assistant-activity.tsapps/web/src/features/assistant/components/assistant-page.test.tsapps/web/src/features/assistant/components/assistant-page.tsxapps/web/src/features/assistant/components/assistant-skill-activity.test.tsxapps/web/src/features/assistant/components/assistant-skill-activity.tsxapps/web/test/e2e/assistant-pipeline.spec.tscore/src/main/java/com/orgmemory/core/assistant/AssistantAgentActivity.javacore/src/test/java/com/orgmemory/core/assistant/AssistantAgentActivityTests.javaintegrations/ai-model-gateways/src/main/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacks.javaintegrations/ai-model-gateways/src/test/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacksTests.java
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: Backend · Java 25
- GitHub Check: Web · Node 24
🧰 Additional context used
📓 Path-based instructions (7)
apps/web/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/web/CLAUDE.md)
apps/web/**/*.{ts,tsx}: Extend the established OrgMemory product shell, design tokens, shadcn/Radix primitives, and existing layout patterns; do not introduce a separate visual system in the web application.
Generate ordinary REST clients fromcontracts/openapi.jsonusing Hey API.
Use TanStack Query for server state, TanStack Router for navigation, and limit Zustand to durable or high-frequency UI state.
Preserve keyboard accessibility, light/dark theme support, loading and error states, and responsive behavior in the web application.
Files:
apps/web/src/features/assistant/components/assistant-skill-activity.test.tsxapps/web/src/features/assistant/components/assistant-page.test.tsapps/web/src/features/assistant/components/assistant-skill-activity.tsxapps/web/test/e2e/assistant-pipeline.spec.tsapps/web/src/features/assistant/assistant-activity.tsapps/web/src/features/assistant/components/assistant-page.tsx
apps/web/**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (apps/web/CLAUDE.md)
Preserve the existing browser test suite when changing the web application.
Files:
apps/web/src/features/assistant/components/assistant-skill-activity.test.tsxapps/web/src/features/assistant/components/assistant-page.test.tsapps/web/test/e2e/assistant-pipeline.spec.ts
**/*
📄 CodeRabbit inference engine (AGENTS.md)
**/*: Treat the repository and runtime evidence as the engineering system of record; do not treat chat or Northstar as authoritative.
Before changing a domain, read its specification, test-coverage document, and applicable decision filenames.
Material decisions about domain boundaries, authorization, persistence, publication, concurrency, cache isolation, parity scope, or deployment require an independent architecture challenge and documented alternatives before implementation.
Do not use completed increment documents as the source for current behavior; use them only for history or archaeology.
Before using unfamiliar Spring Boot, Spring Modulith, Spring AI, Gradle, React, Vite, Tailwind, TypeScript, Next.js, or Fumadocs APIs, consult current official documentation, Context7, and the relevant verification skill.
Readdocs/guidelines/agent-safety.mdbefore retrieval, AI, MCP, permission, upload, graph, or export work; never commit secrets or customer data.
Keepddl-auto=validateand pair every persisted-model change with a Flyway migration.
Use the testing harness; a terminating clean test is the JVM context gate, andbootRunis not verification.
Files:
apps/web/src/features/assistant/components/assistant-skill-activity.test.tsxapps/api/src/main/java/com/orgmemory/api/assistant/AssistantController.javaapps/web/src/features/assistant/components/assistant-page.test.tsapps/web/src/features/assistant/components/assistant-skill-activity.tsxapps/api/src/test/java/com/orgmemory/api/assistant/UiMessageStreamTests.javaapps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.javaapps/api/src/main/java/com/orgmemory/api/assistant/UiMessageStream.javaARCHITECTURE.mdintegrations/ai-model-gateways/src/test/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacksTests.javacore/src/test/java/com/orgmemory/core/assistant/AssistantAgentActivityTests.javacore/src/main/java/com/orgmemory/core/assistant/AssistantAgentActivity.javaapps/web/test/e2e/assistant-pipeline.spec.tsapps/web/src/features/assistant/assistant-activity.tsintegrations/ai-model-gateways/src/main/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacks.javaapps/web/src/features/assistant/components/assistant-page.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Frontend changes must pass lint, typecheck, tests, and a production build; perform browser verification when the flow warrants it.
Files:
apps/web/src/features/assistant/components/assistant-skill-activity.test.tsxapps/web/src/features/assistant/components/assistant-page.test.tsapps/web/src/features/assistant/components/assistant-skill-activity.tsxapps/web/test/e2e/assistant-pipeline.spec.tsapps/web/src/features/assistant/assistant-activity.tsapps/web/src/features/assistant/components/assistant-page.tsx
apps/web/src/**/*.{ts,tsx}
⚙️ CodeRabbit configuration file
apps/web/src/**/*.{ts,tsx}: OAuth access and refresh tokens must never enter browser JavaScript or
browser storage. Use the HttpOnly BFF session, CSRF-protected mutations,
generated Hey API data clients, accessible states, and both light and
dark themes. Handwritten transport is reserved for documented protocol
flows such as navigation redirects and streaming.
Files:
apps/web/src/features/assistant/components/assistant-skill-activity.test.tsxapps/web/src/features/assistant/components/assistant-page.test.tsapps/web/src/features/assistant/components/assistant-skill-activity.tsxapps/web/src/features/assistant/assistant-activity.tsapps/web/src/features/assistant/components/assistant-page.tsx
**/*.java
📄 CodeRabbit inference engine (AGENTS.md)
Apply IDE inspection only to edited backend Java files.
Files:
apps/api/src/main/java/com/orgmemory/api/assistant/AssistantController.javaapps/api/src/test/java/com/orgmemory/api/assistant/UiMessageStreamTests.javaapps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.javaapps/api/src/main/java/com/orgmemory/api/assistant/UiMessageStream.javaintegrations/ai-model-gateways/src/test/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacksTests.javacore/src/test/java/com/orgmemory/core/assistant/AssistantAgentActivityTests.javacore/src/main/java/com/orgmemory/core/assistant/AssistantAgentActivity.javaintegrations/ai-model-gateways/src/main/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacks.java
apps/api/src/main/java/**/*.java
⚙️ CodeRabbit configuration file
apps/api/src/main/java/**/*.java: Enforce the browser-BFF and resource-server boundaries. Authentication
must resolve an active internal actor through the explicit issuer and
subject binding. Reject identity, tenant, roles, or permissions supplied
by request payloads, JWT email, or untrusted JWT role claims.
Files:
apps/api/src/main/java/com/orgmemory/api/assistant/AssistantController.javaapps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.javaapps/api/src/main/java/com/orgmemory/api/assistant/UiMessageStream.java
🧠 Learnings (1)
📚 Learning: 2026-07-26T05:46:47.443Z
Learnt from: kl3inIT
Repo: kl3inIT/OrgMemory PR: 61
File: apps/mcp/src/main/java/com/orgmemory/mcp/McpSecurityConfiguration.java:50-52
Timestamp: 2026-07-26T05:46:47.443Z
Learning: In OrgMemory, treat the `apps/mcp` and `apps/api` as independent protocol adapter modules. When adjusting OAuth/wire-level scopes, do not introduce a shared Java constant or create a code dependency from `apps/mcp` to `apps/api` solely to deduplicate scope values. Instead, keep OAuth/scope constants adapter-local (e.g., in the relevant adapter/security configuration classes) and ensure cross-adapter consistency via automated realm/OAuth/authorization tests, rather than via shared wiring-level constants or cross-module references.
Applied to files:
apps/api/src/main/java/com/orgmemory/api/assistant/AssistantController.javaapps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.javaapps/api/src/main/java/com/orgmemory/api/assistant/UiMessageStream.java
🔇 Additional comments (14)
core/src/main/java/com/orgmemory/core/assistant/AssistantAgentActivity.java (1)
7-33: LGTM!Also applies to: 35-37
core/src/test/java/com/orgmemory/core/assistant/AssistantAgentActivityTests.java (1)
12-41: LGTM!integrations/ai-model-gateways/src/main/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacks.java (1)
7-9: LGTM!Also applies to: 32-32, 45-45, 54-54, 150-162, 204-227
integrations/ai-model-gateways/src/test/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacksTests.java (1)
82-108: LGTM!Also applies to: 110-143, 150-161
apps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.java (1)
14-20: LGTM!apps/api/src/main/java/com/orgmemory/api/assistant/AssistantController.java (1)
460-462: LGTM!ARCHITECTURE.md (1)
429-435: LGTM!apps/api/src/main/java/com/orgmemory/api/assistant/UiMessageStream.java (1)
103-133: LGTM!apps/api/src/test/java/com/orgmemory/api/assistant/UiMessageStreamTests.java (1)
62-74: LGTM!apps/web/src/features/assistant/assistant-activity.ts (1)
1-93: LGTM!apps/web/src/features/assistant/components/assistant-skill-activity.tsx (1)
1-101: LGTM!apps/web/test/e2e/assistant-pipeline.spec.ts (1)
304-308: 📐 Maintainability & Code QualityProvide repository-harness verification evidence.
This change modifies streaming state and browser rendering. Provide results for the configured lint, typecheck, unit tests, production build, and Playwright suite.
As per coding guidelines, “Frontend changes must pass lint, typecheck, tests, and a production build; perform browser verification when the flow warrants it.”
Also applies to: 610-630, 833-903
Source: Coding guidelines
apps/web/src/features/assistant/components/assistant-page.test.ts (1)
3-109: LGTM!apps/web/src/features/assistant/components/assistant-skill-activity.test.tsx (1)
1-48: LGTM!
Summary
Verification
./gradlew.bat --no-daemon compileJava./gradlew.bat :core:test --rerun-tasksgit diff --checkSummary by CodeRabbit
New Features
Bug Fixes