Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
01e5a5f
Fix: workaround dist install bug.
bjones1 Nov 1, 2026
73f3ec0
Clean: bt fragments / use.
bjones1 Nov 1, 2026
c6b85f1
Spec: allow cross-reference content.
bjones1 Nov 2, 2026
225d627
Add: optional content in cross-references.
bjones1 Nov 6, 2026
e753ccf
Fix: parse HTML as a fragment, not a document.
bjones1 Nov 6, 2026
27a2a21
Fix: report source which can't be translated in the Client.
bjones1 Nov 6, 2026
b333918
Fix: re-translations caused by math in a gather element.
bjones1 Nov 6, 2026
cb5a8c9
Test: saving an empty doc block comments out the next line.
bjones1 Nov 6, 2026
0da1137
Fix: keep the newline ending a doc block when saving.
bjones1 Nov 6, 2026
a8a76f0
Docs: keep source comments short.
bjones1 Nov 6, 2026
be1d188
Fix: overflow from a fragment's large following value.
bjones1 Nov 6, 2026
832b9a3
Fix: close an unclosed tag or comment at the end of its doc block.
bjones1 Nov 6, 2026
b42206b
Fix: keep content inside a fragment when saving.
bjones1 Nov 6, 2026
55a7ff1
Fix: report an unclosed tag which hides the text after it.
bjones1 Nov 7, 2026
9ed9737
Fix: close an unclosed declaration at the end of its doc block.
bjones1 Nov 8, 2026
7a633ad
Perf: parse a cross-reference's content fewer times.
bjones1 Nov 8, 2026
567684d
Clean: improve comment, wrap lines.
bjones1 Nov 8, 2026
b6b3c9c
Fix: make the Client read-only while the IDE's text can't be translated.
bjones1 Nov 9, 2026
74dbd46
Fix: update dependencies with security advisories.
bjones1 Nov 9, 2026
2d66f4f
Clean: remove outdated comment.
bjones1 Nov 9, 2026
31cb4c9
Test: run the VSCode tests' webserver on an OS-assigned port.
bjones1 Nov 9, 2026
245c431
Build: run tests with cargo nextest; echo commands instead of info ba…
bjones1 Nov 9, 2026
6b0da96
Fix: remove workaround for fixed issue.
bjones1 Nov 9, 2026
423d28a
Docs: cleanup.
bjones1 Nov 9, 2026
26e34ef
Test: serialize browser tests with a nextest test group.
bjones1 Nov 9, 2026
d0de1d5
Fix: move to released dprint; update htmd version.
bjones1 Nov 9, 2026
8342bd4
Fix: recent update changed indents in package.json5.
bjones1 Nov 10, 2026
ea31f9c
Freeze for release
bjones1 Nov 10, 2026
061a0a1
Test: click a doc block's contents, not the indent covering its top l…
bjones1 Nov 10, 2026
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
40 changes: 40 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# The CodeChat Editor, a word processor for software developers.<br>Copyright
# (C) 2024-2026 Bryan A. Jones.
#
# This file is part of the CodeChat Editor.
#
# The CodeChat Editor is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# The CodeChat Editor is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# the CodeChat Editor. If not, see
# [http://www.gnu.org/licenses](http://www.gnu.org/licenses).
#
# `nextest.toml` -- a cargo-nextest configuration file
# ====================================================
#
# See the [docs](https://nexte.st/docs/configuration/) for this file. nextest
# reads it only from `.config/` in the workspace root.
#
# Browser-backed tests
# --------------------
#
# The `overall` test binary (`server/tests/overall.rs`, which gathers the
# `overall_*.rs` modules) drives a browser through WebDriver. Overlapping
# WebDriver sessions are unreliable on macOS CI, so run these tests one at a
# time. nextest runs each test in its own process; a
# [test group](https://nexte.st/docs/configuration/test-groups/) limits how many
# of those processes run at once, while other tests still run in parallel.
[test-groups]
web-driver = { max-threads = 1 }

[[profile.default.overrides]]
filter = "binary_id(codechat-editor-server::overall)"
test-group = "web-driver"
1 change: 0 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,4 @@ jobs:
- name: Run tests
run: |
rustup update
# <fragment id="cc-Y8gI-nu0l_"></fragment>
./bt install && ./bt full
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
# we specify bash to get pipefail; it guards against the `curl` command
# failing. otherwise `sh` won't catch that `curl` returned non-0
shell: bash
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.33.1/cargo-dist-installer.sh | sh"
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.34.0/cargo-dist-installer.sh | sh"
- name: Cache dist
uses: actions/upload-artifact@v7
with:
Expand Down
35 changes: 20 additions & 15 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ project:

1. Assign a unique id for that section: `<h3 id="some_unique_id">section
title</h3>` for a level-3 section; in a code file, this must be placed in a
doc block. Any HTML element with an id can be the target of either a
hyperlink or a cross-reference.
2. Refer to it using a hyperlink or cross-reference. For example, the following
syntax links directly to this section's heading: `[Foo](#cc-sZ0Glsgjhu)`
doc block. Any HTML element with an id can be the target of a
cross-reference.
2. Refer to it using a cross-reference. For example, the following syntax links
directly to this section's heading: `<xref ref="cc-sZ0Glsgjhu">Foo</xref>`
(link text is "Foo") / `<xref ref="cc-sZ0Glsgjhu"></xref>` (link text comes
from the cross-referenced span: "Cross-references, gather elements, and
fragments"); the same syntax (a bare id with no file) also links to any file
Expand All @@ -73,15 +73,15 @@ project:
When implementing a specification:

1. Label each doc block preceding non-contiguous section of code of more than
three lines with a fragment placed at the end of the doc block: `<fragment
three lines with a fragment placed at the end of the doc block: `<fragment
id="some_unique_id1"></fragment>`.
2. Gather these fragments in a subheading following the specification: `<h4
id="another_unique_id" data-gather="some_unique_id1 some_unique_id2
...">Implementation of [title of this section]</h4>`.

Each id must be unique throughout the entire project. To create an id:

1. Randomly generate an id of the form `cc-[10 random ASCII letters or
1. Randomly generate an id of the form `cc-[10 random ASCII letters or
numbers]`.
2. grep the project to ensure this id is unique.

Expand All @@ -103,6 +103,11 @@ the root of the project.
* To format and lint the entire project, execute `./bt flint`.
* To run all tests, execute `./bt test`.

### Testing

Browser-based integration tests (see [overall.rs](server/tests/overall.rs)) run
slowly. Use other, faster tests where possible.

Commenting guide
----------------

Expand Down Expand Up @@ -150,10 +155,9 @@ consistent.
fn set_contents(&mut self, contents: String);
```

* Scale a comment's length to its altitude instead of aiming for uniform
brevity: file- and section-level comments carry the design narrative and may
run for dozens of lines (see `server/src/processing/cache.rs`), while a
comment on a single statement is a line or two.
* Place specifications or long documentation for a file in an accompanying
Markdown file; see `server/src/processing/cache.rs` and
`server/src/processing/cache-spec.md`. Comments in source should be short.

* In new work, mark deferred work with `TODO:` followed by both the task and the
condition which will resolve it, so a later reader knows when it may be
Expand All @@ -173,11 +177,11 @@ rustdoc renders neither. Many existing signatures are not yet annotated this
way; add annotations to signatures you touch rather than sweeping the tree:

```rust
/// Phase 1 of hydration: parse the HTML, walk the DOM, then commit the
/// collected facts to the cache.
/// Phase 1 of hydration: walk the DOM, then commit the collected facts to the
/// cache.
fn hydrate_dom(
// The HTML to hydrate.
html: &str,
// The parsed HTML to hydrate.
dom: Rc<Node>,
// The cache for the project containing this file.
cache: &Arc<Mutex<Cache>>,
// The parsed, patched DOM plus the walk results needed by later phases.
Expand Down Expand Up @@ -206,7 +210,8 @@ Source files follow this template (a few predate it; match it in new files):
separate from the title which follows it.
3. A single level-1 heading titling the file: the file name in backticks --
matching the file's actual name -- then `--`, then a short description.
4. The file-level design narrative, if the file needs one.
4. A short file-level design narrative or reference to additional content in the
related Markdown file, if the file needs one.
5. A `Modules` section, if the file has submodules, then an `Imports` section.
In Rust its subsections are `### Standard library`, `### Third-party`, and
`### Local`; the Client and the VSCode extension use their own names, so
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,19 @@ Changelog
[Github master](https://github.com/bjones1/CodeChat_Editor)
-----------------------------------------------------------

* No changes.
Version 0.3.2 -- 2026-Nov-09
----------------------------

* Changed `<xref>` to support optional content.
* Close an unclosed tag, comment, or declaration at the end of its doc block,
instead of letting it hide or move later doc blocks.
* Report an error instead of crashing when an unclosed code block hides later
doc blocks, and instead of erasing text when an unclosed tag hides the text
after it. The Client shows this error in a toast and keeps showing the last
text which translated, read-only until the error is fixed.
* Keep anything inside a `<fragment>`, such as the text after a missing
`</fragment>`, instead of erasing it on the next save.
* Fix retranslations of math in gather elements.

Version 0.3.2 -- 2026-Oct-31
----------------------------
Expand Down
Loading
Loading