Repository navigation
feat(editor): Excel の読み取り専用プレビューを追加 - #1
Conversation
Port stablyai#13532 into editor/xlsx with current local/runtime wiring. Preserve CSV, chat, terminal artifacts, and binary diff behavior. Support namespace URIs, one-cell extents, cacheless chart references, and chart-only sheets. Co-authored-by: Markel Alvarado <[email protected]>
Keep only the perimeter borders of row bands inside a merged range. Verify drawing anchors through zoom changes and wait for selected tab underline transitions before capturing Electron evidence. Co-authored-by: Markel Alvarado <[email protected]>
Show a localized read-only status, keep sheet tabs visible in narrow panes, and use the existing i18next plural families for row and column counts. Co-authored-by: Markel Alvarado <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2a402f4e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Preserve short rows, include merged extents, avoid argument and tick-loop limits, isolate chart gradients, and fall back to stored numbers for unsupported scientific formats. Co-authored-by: Markel Alvarado <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4f0904a6f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keep conditional-format priority, default cell styles, repeated chart plots, rounded dates, and inferred overflow direction. Preserve raw values for unsupported fraction formats. Co-authored-by: Markel Alvarado <[email protected]>
ELI5
Excel(.xlsx・.xlsm)を開くと「Binary file — cannot display」と出ていた箇所に、シートの書式・画像・グラフを含む読み取り専用プレビューを追加します。
同じ
preview.xlsxを、1440×1100 の隠した Electron で開きました。before は変更前の basef173998203、after は本 PR の build です。全体と editor 部分を、同じ大きさで撮影しています。What Changed
editor/xlsx/にまとめました。元の作者 Markel Alvarado さんを commit の Co-author に記載しています。filesystem-file-content-inspection.ts、runtime のfile-reads.ts/file-preview-budget.ts、renderer の分割読み込みとEditorEditFileSurfaceを接続しました。チャット画像・ターミナル成果物・binary diff への振り分けも確認しています。Why
agent が openpyxl で作った Excel を、そのまま Orca で確認できるようにするためです。既存の viewer を専用 directory に移し、既存ファイルへの変更を接続部分に絞ることで、fork に上流更新を取り込みやすくしています。新しい依存はありません。
Linked Issue
関連 issue なし。移植元は stablyai#13532 です。Eotel/orca の
eotel/main向けの変更です。Visual Proof
変更前は binary 表示でした。以下は同じ自作ブックの Orca 表示と LibreOffice の PDF です。日本語、結合タイトル、罫線、塗り、文字色、通貨・日付、画像とグラフを比較しました。グラフの棒の太さ・書体・目盛りは上流 viewer の近似表示です。軸の数値に通貨記号(¥)は付きません。元の印刷範囲は E 列までのため、PDF では F 列まで伸びるグラフの右端が切れています。EMU からの換算は元ファイルどおりです。
Excel 12・15 で保存した Apache POI の sample でも確認しました。元の sample は commit していません。
Testing
ORCA_BACKGROUND_LAUNCH=1を付け、macOS の隠した Electron を Playwright CDP で操作・撮影しました。自作ブックの表示、シート切り替え、列幅のキー操作、画像・グラフ、窓が非表示のままであることを確認しています。移植コード・共有定義・読み込みと振り分けのテストは49ファイル・911件で成功しました。openpyxl の実出力、LibreOffice 保存形式、Excel 形式の合成 fixture を含みます。Excel 本体の sample は WithChart、WithThreeCharts、SimpleScatterChart、WithDrawing を開いて確認しました。
結合セル内の格子線・罫線を抑え、タブの下線が切り替わる前に撮影しないよう、選択状態とアニメーションの完了を確認します。zoom 前後で画像・グラフとセルの位置関係も検査しています。
独立 audit に加えて、デザイン評価と実画面の検査を別々の担当に分けて impeccable critique を行いました。P1 の読み取り専用表示、P2 の狭幅でのタブの見切れ、P3 の単数・複数の表示を修正しました。明暗テーマ・en/ja・幅280/360pxの8条件で再確認し、P0・P1 は0件です。英語は「1 row / 1 column」「27 rows / 5 columns」、日本語は「1 行 / 1 列」「27 行 / 5 列」を実画面で確認しています。
列境界の濃い表示はサイズ変更ハンドルのフォーカス表示で、通常時には出ません。自動レビュー対応後に再ビルドした隠し Electron の操作テストは2件成功しました。追加の openpyxl ブックで、A1:D4 の結合見出しと、色が異なる2本の面グラフも確認しています。
ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2 --stepTimeoutMs=14400000を最後まで実行しました。unit は34,992件成功・6件失敗でした。全体検査は成功していません。再確認の結果は次のとおりです。
f173998203でも同じテスト名・エラーで再現しました。PTY のソースは変更していません。最新
c278e1cの fork CI は13件成功・10件スキップです。WSL は初回の Ubuntu import が cancelled で終了した後、再実行(attempt 2)で成功しました。static analysis and typecheckは Blacksmith runner 未割り当てのため未実行です(job)。最新 Code Review は確認中です。Security Review は指摘0件で完了しています。
Windows・Linux と、実 SSH 接続は未確認です。runtime の読み込みと旧 host の binary 応答は回帰テストで確認しています。
AI Disclosure
Codex を実装・検証に使用しました。
Review
最初に既存ファイルの接続部分と
spreadsheet-file-extensions.ts、次にxlsx-workbook.ts・xlsx-drawings.ts・xlsx-chart-references.tsを確認してください。元の parser/grid のテストも含めています。自動レビューは
e2a402fで Code Review 6件(P1: 1件、P2: 5件)・Security Review 0件でした。6件ともa4f0904で修正し、対象外とした指摘はありません。6件の回帰テストを追加し、V8 でも条件付き書式15万セルと浮動小数点の目盛り計算を再確認しました。追加の独立 impeccable audit でも、新しい P0・P1 はありません。
a4f0904の自動再レビューは Code Review 7件(すべてP2)・Security Review 0件でした。6件をc278e1cで修正し、生成物にない負数の SPARKLINE 列グラフ1件は対象外に記しました。追加の回帰テストと独立 impeccable audit を行い、新しい P0・P1 はありません。
c278e1cの自動レビューと CI は確認中です。Agent skill upstream boundary
Notes
既知の制限
上流版 desktop から fork 版 host(runtime・SSH)に接続すると、host が .xlsx を
isImage: trueと spreadsheet の MIME で返すため、上流版 client は ImageViewer に渡して壊れた画像を表示します。desktop を fork 版にそろえるまでの移行期間の制限です。上流版 mobile は拡張子で画像と判定した場合だけreadPreviewを使うため、この影響はありません。サイズ変更の取っ手が先に並ぶため、5列・27行の fixture では Tab キーでシートタブへ到達するまで34回必要です。この PR では変更しません。
グラフの軸には通貨記号(¥)が付かず、棒の太さも LibreOffice の PDF と異なります。
指数書式と分数書式は未対応のため、保存された数値をそのまま表示します。
対象外
merge は依頼元の受け入れ確認後に判断します。
Checklist
Session: orca-xlsx-preview(Codex)