feat(word-addin): Office.js task pane for Mike (chat, actions, workflows, projects) - #23
Open
amal66 wants to merge 16 commits into
Open
feat(word-addin): Office.js task pane for Mike (chat, actions, workflows, projects)#23amal66 wants to merge 16 commits into
amal66 wants to merge 16 commits into
Conversation
Remove word-addin/ and its root build/test wiring from main. The add-in comes back via a dedicated feature branch + PR so the work is reviewable as one focused diff instead of commits interleaved through main history. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
amal66
force-pushed
the
feat/word-addin-pr
branch
from
July 6, 2026 17:39
13ea693 to
ff667ae
Compare
…text passthrough
The byte-stream -> SSE-frame reader loop was copy-pasted in three places
(apps/web's useAssistantChat hook and the Word add-in's api/client.ts).
Extract one framework-agnostic readSSE(response, onEvent, { signal }) helper
so every caller shares a single, tested parser. `[DONE]` is treated as
terminal (cancels the reader), matching the add-in's need to ignore the
harmless trailing error frame the API emits after it.
Also thread an optional `documentContext` through streamChat so the add-in's
document-grounded chat can use the shared client instead of a bespoke one.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the inline getReader()/TextDecoder SSE loop in useAssistantChat with a call to the shared readSSE() helper from @mike/api-client. One parser in the codebase instead of a web-local copy; behavior is unchanged (verified via the assistant parser + applyAssistantStreamEvent unit tests). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Word add-in (chat, document actions, workflows, projects) that reuses the monorepo's shared packages instead of duplicating them: it configures @mike/api-client once (api/mikeApi.ts) with an Office-session auth provider and a single-place 401-refresh fetchImpl, streams via the shared readSSE helper (api/stream.ts), and imports types from @mike/core. No hand-rolled HTTP client, SSE parser, or re-declared Project/Workflow/ApiKeyStatus types — so adding an endpoint or chat event type is now a one-place change in packages/* that the add-in inherits. UI continues to come from @mike/shared. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amal66
force-pushed
the
feat/word-addin-pr
branch
from
July 7, 2026 02:37
ff667ae to
19c87b1
Compare
…tream
readSSE now returns { done: boolean } — true when a [DONE] frame ended the
stream, false when the reader hit EOF (or aborted) without one. This lets the
tabular generation stream, which reconnects/resumes when a stream drops before
completing, consume the shared parser instead of its own copy. Existing callers
that ignore the return value are unaffected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…readSSE
Replace the last two hand-rolled SSE reader loops (the tabular-review generate/
resume stream and the tabular chat panel) with the shared readSSE helper. The
generate loop uses readSSE's new { done } return to drive its bounded resume
retries; the chat panel moves its per-frame dispatch into readSSE's onEvent
callback. No behavior change — there is now exactly one SSE parser in the repo.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Mike Office.js task pane for Word: document-aware chat, document actions, saved workflows, project browsing/uploads, Supabase authentication, and hermetic browser coverage.
The add-in lives in
word-addin/(not an npm workspace) and consumes the shared@mike/api-clientSSE transport,@mike/coretypes, and the@mike/shareddesign system via tsconfig paths and webpack aliases, so it stays on the same tested contracts as the web app. The branch is reconciled with currentmain, including the olp UI sync ("feat: sync olp UI as source of truth"), and compiles cleanly against the updated shared packages.Word editing behavior
Word.Range; they never search the whole body or replace the first duplicate match.Replace selectionorReplace selection (tracked).Insert below cursor; they never overwrite selected text.Additional review fixes
metadata.*andskill_md), so production workflows are surfaced instead of filtered out.WORD_ADDIN_PUBLIC_URL; they can never silently ship localhost URLs or an empty Supabase key.RequestedWidth).Verification
Run on this branch after merging current
main(olp UI sync):tsc --noEmit, strict, including the updated shared@mike/api-client/@mike/coresources).Previously verified (not re-run in this reconciliation): Microsoft's Office manifest validator passes for both the development and generated release manifests.
The checked-in
manifest.xmlremains the localhost sideloading manifest;npm run buildwrites the release manifest todist/manifest.xml.🤖 Generated with Claude Code
https://claude.ai/code/session_01CEguyEgXa9JjCciXCcVemC