Skip to content

Format the code base, fix GUI labels and layout, prepare 1.1.0 - #29

Merged
drzo merged 10 commits into
mainfrom
claude/loving-archimedes-r7fcwy
Nov 20, 2026
Merged

drzo merged 10 commits into
mainfrom
claude/loving-archimedes-r7fcwy

Conversation

@drzo

@drzo drzo commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Follow-up to #27 and #28. Four separate commits:

  1. Format the rest of the C++ code base, so a later change to one of those files no longer fails Lint Code Base.
  2. Make the GUI's labels readable and stop its panels opening on top of each other.
  3. Tell the workflow linter about the macos-15 runner labels.
  4. Bump the version to 1.1.0 for the next release.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Code refactoring
  • Build/CI configuration change

Related Issues

Related to #27 and #28

Changes Made

Formatting (263 more files; 284 of 325 project C++ files now follow the style)

  • clang-format applied; about 12,700 changed lines, almost all whitespace and wrapping.
  • Changes cpplint needed beyond formatting:
    • header guards renamed to the names derived from the path under include/ (87 headers);
    • single-argument constructors marked explicit (42);
    • missing standard headers added where a symbol was used without its header (55 includes);
    • same-directory header includes written with their bolt/... path;
    • static_cast / reinterpret_cast instead of C-style casts;
    • } else joined where a comment sat between the brace and the else;
    • snprintf instead of strcpy in one example;
    • NOLINT on using namespace lines in demo programs, on one deliberate include of a .cpp file, and on three uses of long that match an external API or a public signature.
  • No behaviour changes are intended.
  • 41 files are deliberately left unformatted. Each contains duplicated blocks (93 in all) that the linter's copy/paste detector rejects whenever the file is touched, so they need refactoring first. They are listed in the commit message.

GUI

  • The GUI draws text with ImGui's built-in font, which only has Latin-1 glyphs, so every emoji and bullet in a label was drawn as ?. Those characters are removed from the strings the GUI draws; terminal output keeps them.
  • Text arriving from elsewhere (AI replies, logged messages) is passed through a small filter that maps typographic characters to ASCII and drops what the font cannot draw.
  • Project Files, Code Editor, AI Assistant, Console Log and the two settings windows get a default position and size on first use, instead of all opening at the same spot. Saved positions in imgui.ini still win.
  • The status bar text was pushed below the bottom edge by the theme's padding; fixed.
  • LSP completion and diagnostic icons become one-letter tags; the widget demo's emoji tab icons are dropped.

Workflow linter

  • .github/linters/actionlint.yml lists the macos-15 and macos-15-intel runner labels, which the bundled actionlint predates. No check is turned off.

Version 1.1.0

  • A v1.0.0 release already exists, built from the code before the repairs. CMake project version, vcpkg manifest, Windows version resource and MSIX manifest move to 1.1.0.
  • The shared library version follows the project version instead of a second hard-coded number, and the GUI's About window shows the version it was built with.
  • Release notes template: lists the RPM and its install command; the macOS installation steps are dropped while macOS builds are unavailable.

Testing

  • All existing tests pass
  • Manual testing performed

Locally on Linux (GCC): 98/98 CTest tests; scripts/smoke_test.sh passes including the GUI programs and model inference; bolt --version prints bolt 1.1.0. The GUI was checked by screenshot under a virtual display: labels render, the three panels sit side by side, the status bar is readable. clang-format 15.0.7, cpplint 1.6.1 and jscpd 3.5.3 (the linter image's versions) report nothing on the changed files.

CI results will be added here once the runs finish.

Reviewer Notes

  • Some source files are not part of any build target (for example src/bolt/editor/code_folding_state.cpp). They were formatted and lint-fixed like the rest, but the compiler never checks them.
  • The GUI changes alter visible text (no emoji icons). That is a deliberate trade for labels that render; restoring icons would need a font with those glyphs and an ImGui build with 32-bit characters.

Generated by Claude Code


Devin Review

Apply .clang-format to 263 more files and fix what cpplint then
reports, so that changing one of them no longer fails Lint Code Base.
Together with the 21 files formatted earlier, 284 of the 325 project
C++ files now follow the style.

Beyond whitespace and wrapping, cpplint needed:
- header guards renamed to the names derived from the path under
  include/ (87 headers);
- single-argument constructors marked explicit (42);
- missing standard headers added where a symbol was used without its
  header (55 includes);
- same-directory header includes written with their bolt/... path;
- project headers included with quotes in three tests;
- static_cast / reinterpret_cast instead of C-style casts;
- "} else" joined where a comment sat between the brace and the else;
- snprintf instead of strcpy in one example;
- NOLINT on using-directives in demo programs, on one deliberate
  include of a .cpp file, and on three uses of long that match an
  external API or a public signature.
No behaviour changes are intended.

41 files are left unformatted on purpose. Each contains duplicated
blocks that the linter's copy/paste detector rejects whenever the file
is touched, so they need refactoring before they can be reformatted:

  demo_external_lsp.cpp demo_gpu_acceleration.cpp
  demo_lsp_editor_integration.cpp demo_lsp_integration.cpp
  demo_multi_cursor.cpp test_benchmark_suite.cpp test_gpu_simple.cpp
  test_gpu_standalone.cpp test_performance_profiler.cpp
  include/bolt/ai/ai_code_generator.hpp
  include/bolt/ai/ai_refactoring_engine.hpp
  include/bolt/collaboration/collaboration_protocol.hpp
  include/bolt/collaboration/collaborative_session.hpp
  include/bolt/core/code_analyzer.hpp include/bolt/core/editor_store.hpp
  include/bolt/drawkern/ai_integration.hpp
  include/bolt/drawkern/drawkern.hpp
  include/bolt/editor/command_history.hpp include/bolt/gui/widgets.hpp
  include/bolt/test_framework.hpp include/bolt/utils/tensor_utils.hpp
  src/bolt/ai/ai_code_generator.cpp src/bolt/ai/enhanced_ai_manager.cpp
  src/bolt/ai/koboldcpp_provider.cpp src/bolt/ai/rwkv_wrapper.cpp
  src/bolt/ai/unified_rag_manager.cpp src/bolt/core/plugin_system.cpp
  src/bolt/drawkern/ai_integration.cpp src/bolt/drawkern/yacc_grammar.cpp
  src/bolt/editor/debugger_interface.cpp src/bolt/editor/editor_pane.cpp
  src/bolt/editor/lsp_editor_bridge.cpp
  src/bolt/editor/split_view_manager.cpp
  src/bolt/editor/syntax_highlighter.cpp src/bolt/editor/tab_bar.cpp
  src/bolt/gui/widget_registration.cpp src/bolt/lsp/lsp_client.cpp
  src/bolt/network/network_buffer.cpp test/test_bpe_tokenizer.cpp
  test/test_model_loader.cpp test/test_plugin_system.cpp

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
The GUI draws text with ImGui's built-in font, which only has Latin-1
glyphs, so every emoji and bullet in a label was drawn as '?'. Its three
panels also opened at the same default position, on top of each other.

- Remove emoji and bullets from the strings the GUI draws (window
  titles, buttons, status text, chat and help messages). Messages that
  go to the terminal keep theirs.
- Text that reaches the GUI from elsewhere (AI replies, logged
  messages) goes through ToDisplayText, which maps common typographic
  characters to ASCII and drops what the font cannot draw.
- Give Project Files, Code Editor, AI Assistant, Console Log and the two
  settings windows a default position and size on first use. Positions
  saved in imgui.ini still win.
- Status bar: use a slim window padding so its text is not pushed below
  the bottom edge.
- Console colouring matched on the removed emoji markers; match on
  "Error" / "Failed" instead.
- LSP completion and diagnostic icons become one-letter tags, and the
  widget demo's emoji tab icons are dropped.

Checked by screenshot under a virtual display.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
The actionlint bundled with the Lint Code Base image predates the
macos-15 and macos-15-intel runner images and reports them as unknown
labels, which fails the lint check on any change to e2e-ci.yml or
release.yml. List them in the linter's configuration. No check is
turned off.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
A v1.0.0 release already exists, built from the code before the build
and runtime repairs. Bump the project to 1.1.0 for the next release:
CMake project version, vcpkg manifest, Windows version resource and the
MSIX manifest. The shared library version now follows the project
version instead of a second hard-coded number, and the GUI's About
window shows the version it was built with.

Release notes template: list the RPM, add its install command, and drop
the macOS installation steps while macOS builds are unavailable.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
@drzo
drzo marked this pull request as ready for review November 19, 2026 08:00
Copilot AI balanced review requested due to automatic review settings November 19, 2026 08:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

The RPM packaging workflow builds on Fedora, whose newer libstdc++ no
longer pulls <cstdint> in through other headers, and the build stopped
at include/bolt/core/error_handling.hpp: 'SIZE_MAX' was not declared.
Add the include there and in the 18 other formatted files that use
SIZE_MAX or the intN_t / uintN_t names without including it themselves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
Copilot AI balanced review requested due to automatic review settings November 19, 2026 08:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

- widget_framework.cpp and websocket_server.cpp: <cstdint> had been added
  inside a conditional include block, so the Fedora build still failed
  with "'uintptr_t' does not name a type". Include it unconditionally.
- Raw string literals that hold sample C++ source: the linter's
  clang-format sorts #include lines inside them, which other builds of
  the same version do not, and reported 13 lines. Mark those literals
  clang-format off so no build rewrites their contents.
- File-tree tests used fixed directories under /tmp. The same tests are
  built into two test programs that CTest runs in parallel, and one run
  deleted the other's files ("cannot remove all: No such file or
  directory", seen once on Linux gcc Release). Give each process its own
  directory.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
Copilot AI balanced review requested due to automatic review settings November 20, 2026 13:37
None of the three had ever produced a package; dry runs showed why.

Debian and APT:
- The control file's Description continuation lines had no leading
  space, so dpkg-deb rejected it ("field name 'Bolt' must be followed
  by colon").
- Both workflows carried the same 110-line inline script. It is now
  scripts/build-deb.sh, which can also be run locally.
- If the build produced no binary the old script packaged a two-line
  shell script named bolt instead. The new one fails.
- Dependencies are taken from what the binaries link (dpkg-shlibdeps)
  instead of a fixed list.
- The matrix named Ubuntu 22.04 and 24.04 but every job ran on
  ubuntu-latest and wrote the same file name. Each job now runs on its
  own release and names its package after it.
- The version came from "git describe", which gives a bare commit hash
  outside a tag. Use the tag, or the project version plus the commit.
- Each job installs its package with apt, runs bolt from it and removes
  it again.
- The APT workflow attaches a repository archive to the release rather
  than a second copy of the .deb.

RPM:
- Same version and placeholder-binary fixes; the built package is
  installed with dnf and bolt is run from it.

All four release-upload steps move from softprops/action-gh-release@v1,
which targets a Node version runners no longer provide, to v2.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Windows header order introduces conflicting legacy Winsock declarations and redefinition errors in MinGW builds without WIN32_LEAN_AND_MEAN; winsock2.h must precede windows.h and be exempted from automatic include sorting.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 20, 2026 13:42
Include sorting had put <windows.h> before <winsock2.h> in
network_commands.hpp and styx_protocol.cpp. Without
WIN32_LEAN_AND_MEAN, windows.h pulls in the Winsock 1 declarations and
winsock2.h then conflicts with them. Restore the order and mark the
block clang-format off so it stays that way.

Reported by the Copilot review on the pull request.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
The RPM build now compiles and failed at packaging instead: rpmbuild's
check-rpaths rejects the absolute /usr/local/lib entry in every binary
("contains an invalid runpath"). The entry is not needed, since
$ORIGIN/../lib already covers an install under /usr/local.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
Both MinGW jobs began failing at package installation with "target not
found: mingw-w64-x86_64-glfw". MSYS2 has removed glfw and most other
libraries from the legacy MINGW64 repository (its package index now
lists 1,157 packages against 3,975 in UCRT64). Switch the jobs to
UCRT64, the environment MSYS2 maintains, where every package this build
uses is available.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The header includes windows.h before winsock2.h, causing conflicting Winsock declarations and a critical build regression in the configured MinGW build.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 20, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review has no active issues requiring further changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@drzo
drzo merged commit 314c4a6 into main Nov 20, 2026
48 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants