Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the application's data management capabilities by introducing a new spreadsheet note type. This feature allows for the creation, editing, and storage of spreadsheet data, providing users with a powerful tool for organizing information. The integration leverages the Univer Sheets library, ensuring a rich and interactive user experience with support for dark mode and automatic data saving. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR introduces an initial “Spreadsheet” note type backed by Univer Sheets, wiring it through the shared note-type definitions, server defaults, and client UI/widget system.
Changes:
- Add
"spreadsheet"to the shared/client/server note type registries (including icons and defaults). - Introduce a new client type widget
Spreadsheet.tsx(Univer Sheets) with basic persistence and dark-mode support. - Expose the new type in UI affordances (note type chooser, context menu “source”, full-width layout) and add an English translation key.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/commons/src/lib/rows.ts | Adds spreadsheet to the allowed note type union. |
| packages/commons/src/lib/notes.ts | Adds an icon mapping for spreadsheet. |
| apps/server/src/services/note_types.ts | Registers spreadsheet with default mime application/json. |
| apps/client/src/widgets/type_widgets/Spreadsheet.tsx | New Univer Sheets-based widget with persistence + dark mode. |
| apps/client/src/widgets/type_widgets/Spreadsheet.css | Ensures the spreadsheet container fills height. |
| apps/client/src/widgets/ribbon/NoteActions.tsx | Treats spreadsheets as having a “source” representation. |
| apps/client/src/widgets/note_wrapper.ts | Treats spreadsheets as full-width notes. |
| apps/client/src/widgets/note_types.tsx | Adds spreadsheet to client type widget mappings. |
| apps/client/src/translations/en/translation.json | Adds note_types.spreadsheet translation. |
| apps/client/src/services/note_types.ts | Adds spreadsheet to new-note menu options + minor refactors. |
| apps/client/src/services/in_app_help.ts | Adds spreadsheet to the note-type help mapping. |
| apps/client/src/entities/fnote.ts | Extends client-side NoteType union with spreadsheet. |
| apps/client/package.json | Adds Univer Sheets dependencies. |
| if (command.type !== CommandType.MUTATION) return; | ||
| spacedUpdate.scheduleUpdate(); | ||
| }); | ||
| return () => disposable.dispose(); | ||
| }, [ apiRef, spacedUpdate, workbookLoaded ]); |
There was a problem hiding this comment.
The command listener is attached only once (gated by workbookLoaded) and won’t be re-attached if onContentChange() later disposes the active workbook and creates a new one (e.g. after sync updates). After such a reload, mutations in the new workbook won’t trigger spacedUpdate.scheduleUpdate(). Track the active workbook (e.g., workbook id / incrementing version state) in the effect dependencies or register the listener immediately after createWorkbook() and dispose the previous listener when replacing the workbook.
Closes #1841.