Skip to content

Add Excel and JSON file previews#20314

Closed
GitHamza0206 wants to merge 55 commits intoanomalyco:devfrom
GitHamza0206:GitHamza0206/excel-preview
Closed

Add Excel and JSON file previews#20314
GitHamza0206 wants to merge 55 commits intoanomalyco:devfrom
GitHamza0206:GitHamza0206/excel-preview

Conversation

@GitHamza0206
Copy link
Copy Markdown

What does this PR do?

Adds session preview support for JSON and Excel files. JSON files are detected by extension or MIME, formatted for readability, and can still be opened in a new tab. Excel files are now treated as previewable binaries, parsed with xlsx, and rendered as a simple table with sheet tabs when a workbook has multiple sheets.

How did you verify your code works?

Ran bun test --preload ./happydom.ts ./src/pages/session/preview-tab-helper.test.ts and bun test --preload ./happydom.ts ./src/pages/session/helpers.test.ts. Full pre-push typecheck is currently blocked by an unrelated existing error in packages/teams/src/index.test.ts (bun:test types not found).

- Add preview-tab-helper.ts with constants and detection helpers
- Update preview-tab.tsx to render PDF via embed with base64 data URL
- Add pdf to previewExtensions in helpers.ts
- Server: return base64 content for previewable binaries (PDF, audio) in File.read
- Add previewableBinaryExtensions, isPreviewableBinaryByExtension, getPreviewableBinaryMimeType

Made-with: Cursor
Clicking + now shows an Add Project dialog with two options: create a
new empty directory (name + location form with native browse on desktop)
or open an existing directory. Adds POST /file/mkdir backend endpoint
and regenerates the SDK.
…ion preview tab

- Removed the download PDF button and its associated logic.
- Updated the layout to improve the display of the PDF preview, ensuring the iframe takes up more vertical space.
- Added an upload button in the session side panel for users to upload files.
- Introduced a new `write` method in the file handling module to support writing files with base64 encoding.
- Updated the backend to handle file write requests via a new POST /file/write endpoint.
- Enhanced the SDK to include file writing capabilities.
GitHamza0206 and others added 23 commits March 27, 2026 00:27
Add /fs/list endpoint for unscoped directory listing and relax workspace
middleware to accept non-git directories. Update directory picker dialog
to use the new endpoint so users can navigate to any folder on their machine.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Integrations popover button in top bar with Pennylane connection status
- Add Integrations settings panel with API key configuration
- Add Pennylane client import dialog (Add Project > Import from Pennylane)
- Add backend endpoints: POST /plugin/pennylane/configure, GET /plugin/pennylane/customers, GET /plugin/pennylane/suppliers
- Make upload button more prominent in file tree sidebar
- Remove changes tab from right sidebar file tree
- Hide Status, Terminal toggle, and Copy path buttons from top bar

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…scripts

feat: add Conductor setup and run scripts
- Use `bun run dev` and `bun run dev:web` instead of hardcoded commands
- Use CONDUCTOR_PORT for dynamic port allocation (worktree isolation)
- Kill stale processes on both API and web ports before starting
- Remove nohup/log redirection (output goes directly to conductor)
- Remove admin login and lnko workspace registration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: simplify conductor run.sh with dynamic ports
Resolves SIM-11. Updated dialog labels from project to client terminology
and removed the filesystem location picker from the create dialog.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…client-instead-of-new-project-refinend

feat: rename New Project to New Client and remove location field
Add a post-creation configuration form for clients with fields for
activité principale, régime TVA, présence de salariés, nature des
revenus, and règles spécifiques. The form appears automatically after
client creation and is re-accessible via right-click context menu.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
File.save() and File.read() prepend Instance.directory, so the path
must be relative. Pass the client directory via the directory query
parameter instead of embedding it in the file path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Mar 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

Hey! Your PR title Add Excel and JSON file previews doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@GitHamza0206 GitHamza0206 marked this pull request as draft March 31, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:compliance This means the issue will auto-close after 2 hours. needs:title

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants