Skip to content

feat(assistant): show bounded skill activity receipts - #309

Merged
kl3inIT merged 3 commits into
mainfrom
feat/assistant-skill-activity-receipt
Aug 6, 2026
Merged

feat(assistant): show bounded skill activity receipts#309
kl3inIT merged 3 commits into
mainfrom
feat/assistant-skill-activity-receipt

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep the Assistant waiting state mounted until answer text is actually visible, so source frames and transport completion cannot create a blank handoff
  • emit bounded, plain-text Skill identity only after successful actor-authorized activation and correlate resource activity with a turn-local ordinal
  • render an Onyx-inspired current-turn Skill receipt that auto-collapses at answer output and terminates safely on error, abort, context change, or empty finish
  • record the Fable 5 architecture challenge, decision 0033, reconciled specs, coverage, and completed increment evidence

Verification

  • ./gradlew.bat --no-daemon compileJava
  • ./gradlew.bat :core:test --rerun-tasks
  • focused core, AI gateway, and API streaming tests
  • Node 24: Oxlint, TypeScript, 75 web unit tests, production build
  • Playwright: 32 browser tests
  • mechanical source checks and git diff --check

Summary by CodeRabbit

  • New Features

    • Added collapsible skill activity cards showing activation and resource-reading progress.
    • Successful skill activity can display a sanitized title and turn-local ordinal.
    • Skill progress now appears alongside the relevant assistant response.
  • Bug Fixes

    • Waiting indicators remain visible until answer text is shown.
    • Empty or unsuccessful responses now display a clear completion-without-answer message.
    • Failed, denied, and unnamed skill activity no longer exposes skill titles.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kl3inIT, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 14c79d8b-2c4e-474f-874f-83da7b16656e

📥 Commits

Reviewing files that changed from the base of the PR and between aa0e89d and c49683f.

📒 Files selected for processing (5)
  • .tegami/2026-08-06-assistant-skill-activity-receipt.md
  • apps/web/src/features/assistant/components/assistant-page.tsx
  • apps/web/test/e2e/assistant-pipeline.spec.ts
  • core/src/main/java/com/orgmemory/core/assistant/AssistantAgentActivity.java
  • core/src/test/java/com/orgmemory/core/assistant/AssistantAgentActivityTests.java
📝 Walkthrough

Walkthrough

The 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.

Changes

Skill activity pipeline

Layer / File(s) Summary
Skill tracking and metadata validation
core/src/main/java/com/orgmemory/core/assistant/AssistantAgentActivity.java, integrations/ai-model-gateways/src/main/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacks.java, related tests
Skill activations receive positive turn-local ordinals. Successful releases map resource reads to the activated Skill. Titles are sanitized, validated, and limited to 80 code points.
API activity stream contract
apps/api/src/main/java/com/orgmemory/api/assistant/*, apps/api/src/test/java/com/orgmemory/api/assistant/UiMessageStreamTests.java
Activity records and serialized SSE payloads now include nullable skillOrdinal and skillTitle fields.
Browser receipt state and rendering
apps/web/src/features/assistant/assistant-activity.ts, apps/web/src/features/assistant/components/*, apps/web/test/e2e/assistant-pipeline.spec.ts, ARCHITECTURE.md
The browser validates and reduces Skill activity into receipt cards. Waiting ends after visible answer text appears. Empty completed streams show a no-answer alert. Tests cover reduction, rendering, sanitization, and end-to-end activity frames.

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
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: bounded Skill activity receipts in the Assistant.
Description check ✅ Passed The description provides a clear summary and verification evidence, but it omits the template's Documentation impact section.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/assistant-skill-activity-receipt

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Tegami

This repository uses Tegami to manage releases. When your changes affect published packages, add a changelog file under .tegami/ before merging.

Create a changelog → · Changelog format

Release preview

Package Bump Version
orgmemory minor 0.2.00.3.0

Changelogs in this PR

Changelog Title
2026-08-06-assistant-skill-activity-receipt.md Improvements

Run pnpm run tegami locally to create a changelog interactively.

Managed by Tegami.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 438cf19 and aa0e89d.

⛔ Files ignored due to path filters (9)
  • docs/decisions/0033-bounded-successful-skill-activity-receipts.md is excluded by !docs/**
  • docs/increments/completed/2026-08-06-assistant-skill-activity-receipt/challenge-brief.md is excluded by !docs/**
  • docs/increments/completed/2026-08-06-assistant-skill-activity-receipt/challenge-verdict.md is excluded by !docs/**
  • docs/increments/completed/2026-08-06-assistant-skill-activity-receipt/design.md is excluded by !docs/**
  • docs/increments/completed/2026-08-06-assistant-skill-activity-receipt/plan.md is excluded by !docs/**
  • docs/increments/completed/2026-08-06-assistant-skill-activity-receipt/verification.md is excluded by !docs/**
  • docs/roadmap.md is excluded by !docs/**
  • docs/specs/domains/assistant-and-mcp.md is excluded by !docs/**
  • docs/tests/domains/assistant-and-mcp.md is excluded by !docs/**
📒 Files selected for processing (15)
  • ARCHITECTURE.md
  • apps/api/src/main/java/com/orgmemory/api/assistant/AssistantController.java
  • apps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.java
  • apps/api/src/main/java/com/orgmemory/api/assistant/UiMessageStream.java
  • apps/api/src/test/java/com/orgmemory/api/assistant/UiMessageStreamTests.java
  • apps/web/src/features/assistant/assistant-activity.ts
  • apps/web/src/features/assistant/components/assistant-page.test.ts
  • apps/web/src/features/assistant/components/assistant-page.tsx
  • apps/web/src/features/assistant/components/assistant-skill-activity.test.tsx
  • apps/web/src/features/assistant/components/assistant-skill-activity.tsx
  • apps/web/test/e2e/assistant-pipeline.spec.ts
  • core/src/main/java/com/orgmemory/core/assistant/AssistantAgentActivity.java
  • core/src/test/java/com/orgmemory/core/assistant/AssistantAgentActivityTests.java
  • integrations/ai-model-gateways/src/main/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacks.java
  • integrations/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 from contracts/openapi.json using 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.tsx
  • apps/web/src/features/assistant/components/assistant-page.test.ts
  • apps/web/src/features/assistant/components/assistant-skill-activity.tsx
  • apps/web/test/e2e/assistant-pipeline.spec.ts
  • apps/web/src/features/assistant/assistant-activity.ts
  • apps/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.tsx
  • apps/web/src/features/assistant/components/assistant-page.test.ts
  • apps/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.
Read docs/guidelines/agent-safety.md before retrieval, AI, MCP, permission, upload, graph, or export work; never commit secrets or customer data.
Keep ddl-auto=validate and pair every persisted-model change with a Flyway migration.
Use the testing harness; a terminating clean test is the JVM context gate, and bootRun is not verification.

Files:

  • apps/web/src/features/assistant/components/assistant-skill-activity.test.tsx
  • apps/api/src/main/java/com/orgmemory/api/assistant/AssistantController.java
  • apps/web/src/features/assistant/components/assistant-page.test.ts
  • apps/web/src/features/assistant/components/assistant-skill-activity.tsx
  • apps/api/src/test/java/com/orgmemory/api/assistant/UiMessageStreamTests.java
  • apps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.java
  • apps/api/src/main/java/com/orgmemory/api/assistant/UiMessageStream.java
  • ARCHITECTURE.md
  • integrations/ai-model-gateways/src/test/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacksTests.java
  • core/src/test/java/com/orgmemory/core/assistant/AssistantAgentActivityTests.java
  • core/src/main/java/com/orgmemory/core/assistant/AssistantAgentActivity.java
  • apps/web/test/e2e/assistant-pipeline.spec.ts
  • apps/web/src/features/assistant/assistant-activity.ts
  • integrations/ai-model-gateways/src/main/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacks.java
  • apps/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.tsx
  • apps/web/src/features/assistant/components/assistant-page.test.ts
  • apps/web/src/features/assistant/components/assistant-skill-activity.tsx
  • apps/web/test/e2e/assistant-pipeline.spec.ts
  • apps/web/src/features/assistant/assistant-activity.ts
  • apps/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.tsx
  • apps/web/src/features/assistant/components/assistant-page.test.ts
  • apps/web/src/features/assistant/components/assistant-skill-activity.tsx
  • apps/web/src/features/assistant/assistant-activity.ts
  • apps/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.java
  • apps/api/src/test/java/com/orgmemory/api/assistant/UiMessageStreamTests.java
  • apps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.java
  • apps/api/src/main/java/com/orgmemory/api/assistant/UiMessageStream.java
  • integrations/ai-model-gateways/src/test/java/com/orgmemory/integrations/ai/gateway/AssistantSkillToolCallbacksTests.java
  • core/src/test/java/com/orgmemory/core/assistant/AssistantAgentActivityTests.java
  • core/src/main/java/com/orgmemory/core/assistant/AssistantAgentActivity.java
  • integrations/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.java
  • apps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.java
  • apps/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.java
  • apps/api/src/main/java/com/orgmemory/api/assistant/AssistantStreamPart.java
  • apps/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 Quality

Provide 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!

Comment thread apps/web/src/features/assistant/components/assistant-page.tsx
@kl3inIT
kl3inIT merged commit 89e8419 into main Aug 6, 2026
18 checks passed
@kl3inIT
kl3inIT deleted the feat/assistant-skill-activity-receipt branch August 6, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant