General Instruction
July 24, 2026 ยท View on GitHub
Solution to Work On
You are working on the solution REPO-ROOT/Test/UnitTest/UnitTest.sln,
therefore SOLUTION-ROOT is REPO-ROOT/Test/UnitTest.
Projects for Verification
The solution contains:
REPO-ROOT/Test/UnitTest/UnitTest/UnitTest.vcxproj, the unit test project.REPO-ROOT/Test/UnitTest/MiniHttpServer/MiniHttpServer.vcxproj, the portable CLI/browser verification project forSocketHttpServerApi.REPO-ROOT/Test/UnitTest/TuiPlayground/TuiPlayground.vcxproj, the portable interactive TUI verification project.
Run the browser verification project as MiniHttpServer <WebsiteFolder> <AssetsFolder>.
MiniHttpServer Browser Verification
- Windows: from
REPO-ROOT/Test/UnitTest, set the Debug x64 arguments to"..\MiniHttpServer\Website" "..\MiniHttpServer\Assets", build and run throughcopilotBuild.ps1andcopilotExecute.ps1, and drive Chrome with browser control. - Linux and macOS: from
REPO-ROOT/Test/Linux/MiniHttpServer, run the absoluteREPO-ROOT/.github/Ubuntu/build.sh, then run./Bin/MiniHttpServer ../../MiniHttpServer/Website ../../MiniHttpServer/Assets; drive Firefox on Linux and Safari on macOS with browser control. - Open
http://localhost:8888/; expect the styled page and SVG,Module status: loaded from Assets.,Fetch status: cross-origin JSON loaded from Assets., and no console or CORS errors. - Click the button and expect
Button status: action handled by Assets module.; open the second page and return, expecting the module and fetch statuses to succeed. - Open
http://localhost:8889/Assetsand expect the Assets index; expecthttp://localhost:8889/app.jsandhttp://localhost:8889/AssetsExtra/app.jsnot to be served. - Press Enter and expect a clean exit with ports 8888 and 8889 released.
TuiPlayground Verification
TuiPlayground is an interactive ASCII-art painter. Type one command in the dark-gray box at the bottom and press Enter to add it to the paper:
FC RRGGBBchanges the foreground color; the initial foreground isFFFFFF.BC CLEARpreserves destination backgrounds for later lines and rectangles;BC RRGGBBreplaces them. The initial background mode isCLEAR.LINEV THIN|THICK|DOUBLE x y1 y2draws a vertical line.LINEH THIN|THICK|DOUBLE x1 x2 ydraws a horizontal line.RECT THIN|THICK|DOUBLE|ROUND x1 y1 x2 y2draws a rectangle.ROUNDmeans a thin line with rounded corners.CLEAR RRGGBB x1 y1 x2 y2clears a rectangle to the specified background.TYPE x y:TEXTdraws the payload without wrapping and preserves it exactly, including case, spaces, additional colons, and supplementary Unicode characters.HELPdisplays this concise list of accepted command shapes.EXITquits the application.
Command names, formats, CLEAR, and hexadecimal digits are case-insensitive. Parsing is otherwise strict: use exactly one ASCII space at each displayed separator, six hexadecimal digits, signed decimal coordinates in the platform vint range, and ordered ranges. Logical paper (0,0) appears at terminal (1,1) inside the double-line border; signed off-paper coordinates are accepted and clipped.
The command box wraps complete Unicode scalars by display width, grows upward as needed, keeps its blinking cursor visible, and supports only Backspace editing. Enter submits and clears the box. HELP and parse errors display information in a centered rounded overlay; all typing, including Escape, is ignored until Enter dismisses it. q and Q are ordinary command text. EXIT is the only in-application way to quit.
- Windows: from
REPO-ROOT/Test/UnitTest, run& REPO-ROOT/.github/Scripts/copilotBuild.ps1, then run& REPO-ROOT/.github/Scripts/copilotExecute.ps1 -Mode CLI -Executable TuiPlaygroundin an interactive console. - Linux: from
REPO-ROOT/Test/Linux/TuiPlayground, run the absoluteREPO-ROOT/.github/Ubuntu/build.sh, then run./Bin/TuiPlaygroundin an interactive terminal. - macOS: from
REPO-ROOT/Test/Linux/TuiPlayground, run the absoluteREPO-ROOT/.github/Ubuntu/build.sh, then run./Bin/TuiPlaygroundin an interactive terminal.
For manual verification, combine all commands and styles, overlap them, use BC CLEAR and BC 000000, type width-one/width-two and supplementary characters, and submit malformed commands. Verify that HELP lists only the accepted command shapes, that Enter dismisses help and errors, and that Escape is ignored. Resize larger and smaller after drawing: the border, wrapped command box, information overlay, and replayed paper must follow the visible terminal without scrolling. On Windows, start with a scrollback buffer taller than the viewport and require no vertical scrollbar while TUI is active. Submit EXIT and require the original buffer/window geometry and terminal state to be restored.
When any *.h or *.cpp file is changed, unit test is required to run. When shared product source changes, all relevant unit tests are required to run.
When any test case fails, you must fix the issue immediately, even those errors are unrelated to the issue you are working on.
Linux/macOS Specific
REPO-ROOT/Test/Linux/UnitTeststores the Unix configuration forUnitTest.vcxproj.REPO-ROOT/Test/Linux/MiniHttpServerstores the Unix configuration forMiniHttpServer.vcxproj.REPO-ROOT/Test/Linux/TuiPlaygroundstores the Unix configuration forTuiPlayground.vcxproj.
You need to build, run, test, and debug each project in its matching folder, otherwise it will not function properly. On Linux and macOS, only configuration "debug x64" is available, no need to build or run projects with other configurations.