Files
Stefan Broenner 959094f52e feat: Re-add Rename operations + session timeout fix (#330)
* docs: Update specs to reflect verified Data Model table rename limitation

VERIFIED FINDING (2025-12-20):
- ModelTable.Name is READ-ONLY in Excel COM API
- Direct assignment throws TargetParameterCountException (HResult: 0x8002000E)
- No workaround exists (tested: PQ rename, connection rename, refresh, save/reopen)

Updated files:
- research.md: Decision 2 corrected - rename is NOT POSSIBLE
- spec.md: User Story 2 now expects error message, not success
- data-model.md: Added Known Limitations section
- plan.md: Phase 4 simplified to attempt + return clear error
- tasks.md: US2 tasks simplified (no fallback logic)
- quickstart.md: Added limitation caveat for Data Model rename

* feat: Add Rename operations for Power Query and Data Model tables

This feature adds rename capabilities to both Power Query and Data Model tools:

- New 'Rename' action in excel_powerquery MCP tool
- New 'powerquery rename' CLI command
- Validates: empty names, no-op (same name), duplicate conflicts
- Case-insensitive conflict detection
- 10 integration tests covering all scenarios

- New 'RenameTable' action in excel_datamodel MCP tool
- New 'datamodel rename-table' CLI command
- Handles Excel COM limitation: ModelTable.Name is read-only
- For PQ-backed tables: renames underlying query, returns clear error explaining table name is cached
- For non-PQ tables: returns clear error about immutability
- 12 integration tests covering edge cases

- RenameNameRules.cs: Shared validation (Normalize, IsEmpty, IsNoOp, HasConflict)
- COM object cleanup in finally blocks per CRITICAL-RULES
- Exception propagation via batch.Execute() pattern
- 6 MCP contract tests + 2 smoke tests added

- Operation counts: MCP 180->182, CLI 172->174
- All READMEs updated (root, MCP Server, CLI, VS Code extension, gh-pages)
- FEATURES.md updated with new operations
- Quickstart examples for both CLI and MCP usage

Resolves spec: 001-rename-queries-tables
All 33 tasks complete (T001-T033)

* docs: Mark all tasks complete after implementation recovery

* fix: Increase session close timeouts to handle large files

The STA thread join timeout (10s) was shorter than the Excel.Quit() timeout (30s),
causing Dispose() to return before Excel finished closing. This resulted in
intermittent 'file still open' issues when session close was reported.

Changes:
- Excel.Quit() timeout: 30s -> 2 minutes (handles large file saves)
- STA thread join timeout: 10s -> 2.5 minutes (quit timeout + margin)

---------

Co-authored-by: Stefan Broenner <stefan.broenner@microsoft.comm>
2025-12-20 16:32:19 +01:00
..
2025-12-09 10:47:13 +00:00