Skip to content

fix(view): preserve native render failure diagnostics - #329

Open
y4ho0 wants to merge 1 commit into
iOfficeAI:mainfrom
y4ho0:agent/fix-native-render-error-diagnostics
Open

fix(view): preserve native render failure diagnostics#329
y4ho0 wants to merge 1 commit into
iOfficeAI:mainfrom
y4ho0:agent/fix-native-render-error-diagnostics

Conversation

@y4ho0

@y4ho0 y4ho0 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve native PowerPoint and Word rendering exceptions instead of replacing every failure with an “Office is not installed” message
  • distinguish COM class-registration/application availability failures from document-open or rendering failures
  • retain the original failure stage and HRESULT in explicit --render native diagnostics
  • keep --render auto behavior unchanged: native failures still fall back silently to HTML

Why

When Office is installed and COM activation succeeds, a document-specific open failure such as Invoke(Open) hr=0x80070570 was swallowed by the native backend. The caller then reported that PowerPoint or Word was not installed, which sent users toward the wrong fix and hid the useful HRESULT.

The native backends now surface worker-thread failures while preserving their original stack. Explicit native mode maps those failures to either native_unavailable or native_render_failed; auto mode continues to catch them and use the existing HTML fallback.

Validation

  • dotnet build src/officecli/officecli.csproj -c Release — succeeded with 0 errors
  • targeted diagnostic harness covered:
    • non-Windows native request → native_unavailable
    • COM class-not-registered → native_unavailable with HRESULT
    • Invoke(Open) hr=0x80070570native_render_failed with the original stage and HRESULT
    • native backend returning no image → native_render_failed
  • verified that every production caller catches the surfaced backend exception, so --render auto retains its fallback behavior

Closes #326

@y4ho0
y4ho0 marked this pull request as ready for review August 20, 2026 14:14
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.

v1.0.144: native render reports Office missing when COM document open fails

1 participant