Way back in #187, I introduced a hacky tool to show the available space
on a slide: it was a `mdbook` plugin which injected the necessary CSS on
each slide. Crude, but it got the job done.
The logic was moved from Python to a real CSS file with associated
JavaScript in #1842. In #1917, the functionality was moved to a
dedicated “instructor menu”, together with functionality for saving the
state of the Playground on each slide.
Unfortunately, the whole thing was disabled in #1935 since I found that
the Playgrounds lost their code with the saving logic. I was also not
100% happy with dedicating space on each slide for a menu only used by
instructors.
However, I really think we need a tool to let slide editors know about
the available space, so I would like to re-introduce the red box. This
time via a keyboard shortcut to make it easy to toggle as needed.
I’m suggesting enabling this for everyone, with the expectation that
most people won’t find the shortcut and will quickly disable the box if
they do (there is a dedicated button to hide it again).
End-to-end tests have been added for the new functionality.
- Based on feed back from @mgeisler, update the kbd tag guidance in
GEMINI.md to require wrapping each key in its own tag (e.g.,
`<kbd>Ctrl</kbd> + <kbd>S</kbd>`).
- Apply this new convention to existing content in the `src` directory
to ensure consistency.
Adds a specific style convention to GEMINI.md for formatting keyboard
key combinations using the `<kbd>` tag.
The required format is `<kbd>Ctrl + S</kbd>`, which is consistent with
existing usage in the course. This rule will be enforced by the AI
assistant to ensure uniformity.
- Moves the canonical documentation for code block annotations and
language identifiers into STYLE.md.
- Removes the redundant, partial documentation from GEMINI.md.
- Updates GEMINI.md to instruct the AI assistant to always refer to
STYLE.md for guidance.
This change makes STYLE.md the single source of truth for all markdown
and code style conventions, ensuring consistency for both human and AI
contributors.
Add a new "Technical Context: mdbook" section to GEMINI.md.
This section clarifies two key behaviors of mdbook that are essential
for accurate code analysis and review:
- Rust code snippets are compiled in isolation.
- Annotations like 'compile_fail' describe the expected test outcome.
This information is added to prevent incorrect assumptions about shared
scope between code blocks, ensuring more accurate analysis in the
future.
This introduces a new local GitHub action for installing Debian
packages. I noticed that it often takes several minutes to install a few
small packages, and a large part of that time is spent updating the man
page database:
2025-09-20T11:39:25.3001853Z Setting up yapf3 (0.33.0-1) ...
2025-09-20T11:39:25.3045329Z Processing triggers for libc-bin
(2.39-0ubuntu8.5) ...
2025-09-20T11:39:25.4420933Z Processing triggers for man-db
(2.12.0-4build2) ...
2025-09-20T11:41:42.8522570Z Processing triggers for install-info
(7.1-3build2) ...
Excluding the documentation files should make the man-db run much
faster. Compare these two runs:
*
[Before](https://github.com/google/comprehensive-rust/actions/runs/17879390708/job/50845084995):
2m 41s.
*
[After](https://github.com/google/comprehensive-rust/actions/runs/17880418155/job/50847334471):
11s.
I found that Gemini didn’t know how to install the necessary tools
make `dprint fmt` work, so I’m adding more references to `cargo xtask`
in our documentation.
This should help it produce more consistent slides. For example, it will
now know not to add sub-headings to slides.
The initial version of this was generated by Gemini itself, and I then
tweaked it by adding some more constraints.