Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Codex Changelog

## Recent Feature Updates

### ✨ Features & Enhancements

- **Revision Notes System**

- Added the ability to mark specific text selections as "Revision Notes" using the `CTRL+SHIFT+R` (`Cmd+Shift+R` on Mac) shortcut.
- A new "Revision Notes" panel has been added to the editor's sidebar (accessible via a dedicated icon).
- Clicking on a note in the sidebar will automatically scroll the editor and focus on the exact position of the revision.
- The visual style of these notes (background color, borders, etc.) can now be dynamically configured via the `Prefs.ts` file under `revisionNoteStyle`.

- **Section & Paragraph Reordering**

- You can now seamlessly reorganize your document's structure without breaking formatting.
- Hovering over any heading (`H1`, `H2`, `H3`) will reveal discrete "Up" and "Down" arrows on the left side.
- Clicking these arrows will instantly move the entire section (the heading along with all of its inner paragraphs and content) up or down, automatically swapping places with adjacent sections.

- **Text Finder (Search in Page)**

- Added a fully functional "Find in Document" overlay accessible via `CTRL+F` / `CMD+F`.
- Integrated a custom Tiptap Search extension leveraging ProseMirror Decorations to highlight text seamlessly without hijacking the DOM string selection or the user's cursor focus.
- Added auto-scroll to the current match using smooth browser native transitions.
- Supported Keyboard Shortcuts within the Finder input box (`Enter` for next, `Shift+Enter` for previous, `Escape` to close).
- Safely escaped all RegEx characters to support searching for wildcards and punctuation marks without performance bottlenecks.

- **Image Cropper Modal**

- Integrated a robust Image Cropping sub-routine directly into the Editor.
- When selecting an image inside the editor, a new "Crop" button dynamically appears in the toolbar.
- The modal supports freeform cropping using an HTML5 Canvas interface and elegantly replaces the old image with the newly cropped Base64 preview.

- **Dynamic 'Word-Style' Text Styling**

- Transitioned from hardcoded tags to a fully dynamic Custom Styles configuration powered by JSON (`Prefs.ts`).
- Users can now define entirely customized text and heading rules globally mapped within Codex.
- The Editor Toolbar dropdown automatically reads and maps these styles into selectable headings and paragraphs seamlessly.

- **Auto-Save System**

- Implemented an internal interval-based tracker managing the background saving operations of the active note.
- Introduced fully granular controls under Settings to disable Auto-Save or configure its intervals (ranging from 1 to 30 minutes).

- **Settings Menu Redesign & Organization**

- Overhauled `SettingsView.tsx` utilizing Mantine's modern Tab-based interface.
- Split configurations into three accessible macro-categories: **General**, **Editor**, and **Saving**.
- Added a brand new scaling preference (`toolbarSize`) that dynamically alters the size of the Editor Toolbar for accessibility and better clicks.

- **Table of Contents (TOC) UI Uplift**

- Redesigned the TOC container to be scrollable and properly constrained inside the view window, resolving overlap issues for documents spanning many headings.

- **Localization Coverage**
- Added and integrated all strings relating to Auto-Save, Cropper, Editor Width/Border, Text Finder, and Toolbar sizing across all language dictionaries (English `en_US`, Russian `ru_RU`, Simplified Chinese `zh_CN`).

- **Batch File Operations**
- Enabled multi-select in the sidebar allowing users to select multiple pages/folders at once.
- Added the ability to batch export all selected pages to PDF or Markdown directly from the Context Menu.
- Introduced an advanced "Delete from disk" option when deleting files. Checking this box recursively and permanently removes the underlying files from the host machine's physical storage.

- **Code Block Enhancements**
- The "Code Block" button in the toolbar now intelligently defaults to `plaintext` when inserted without selecting a specific language.
- Completely revamped Syntax Highlighting integration (`LowlightPlugin`) to properly utilize all generated `highlight.js` CSS classes. This resolves widespread syntax coloring omissions across almost all languages (e.g., PowerShell keywords are now colored vividly and correctly).

### 🐛 Bug Fixes

- Prevented `CTRL+F` from causing duplicate component mounts if the finder was already active.
- Resolved Z-Index overlapping conflicts between the floating Text Finder and the sticky Editor Toolbar.
- Fixed an issue where the generic Auto-Save feature could crash if trigged while switching components globally.
- Resolved a critical syntax error in the internal `ResizableImage` component that broke Editor Copy/Paste functionality. Users can now copy and paste text, formatting, images, and GIFs seamlessly both inside the app and to external editors like MS Word.
32 changes: 32 additions & 0 deletions MISSING_FILES_FIX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### 🛠️ How to migrate/restore old notes if they don't show up in the app

If you manually moved your old note files into the `~/.config/codex/notes/` folder but Codex isn't showing them, **don't panic, your data is safe.** This happens because Codex uses an internal database/registry to keep track of notes. If you just drop a file into the folder, the app won't recognize it because it's not registered in the database.

To fix this, we can do a quick "file transplant" using the terminal. Here is the step-by-step workaround:

#### Step 1: Register a new note in the app
1. Open the new version of Codex.
2. Create a **New Note** (you can name it something like *"Recovered Note"*).
3. Close the app completely. This forces Codex to register the new note in its database.

#### Step 2: Find the internal file name
1. Open your terminal.
2. Run the following command to find the newly created file (it will be at the top of the list and will have a random string name):
```bash
ls -lt ~/.config/codex/notes/ | head -n 5
```
3. Copy that random filename.

#### Step 3: Overwrite the file
Now, we will overwrite the empty registered note with your old note data.
Run the `cp` (copy) command in your terminal like this:

```bash
cp /path/to/your/OLD_NOTE_FILE ~/.config/codex/notes/THE_NEW_RANDOM_NAME
```
*(Make sure to replace `/path/to/your/OLD_NOTE_FILE` with the actual path of your old file, and `THE_NEW_RANDOM_NAME` with the file name you found in Step 2).*

#### Step 4: You're done!
Open Codex again. Click on the *"Recovered Note"* you created in Step 1, and you will see all your old content perfectly restored!

> **Note on Custom Styles:** If you are upgrading to the new version containing the `CustomStyle` extension, you don't need to worry about formatting crashes. The extension is built with backward compatibility (`default: null`), so it will automatically read and safely upgrade your old files without any errors.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"lowlight": "^3.1.0",
"mathlive": "^0.104.0",
"palettey": "^1.0.4",
"react-image-crop": "^11.0.10",
"react-lowlight": "^3.0.0",
"sanitize-filename": "^1.6.3",
"semver": "^7.5.4",
Expand Down
Loading