Skip to content

webserver enhancements#104

Closed
robertlipe wants to merge 9 commits into
PlummersSoftwareLLC:mainfrom
robertlipe:webserver-enhancements
Closed

webserver enhancements#104
robertlipe wants to merge 9 commits into
PlummersSoftwareLLC:mainfrom
robertlipe:webserver-enhancements

Conversation

@robertlipe

Copy link
Copy Markdown
Contributor
  • Enhance WebServer with recursive mutexes, static serving, and auto-JSON headers

Fixed lockups under load.

Made Content-Type consistent for API vs. static page requests.

Don't recompile app if only config files changed.

robertlipe and others added 4 commits April 13, 2026 21:49
…ON headers

- Switched to recursive_mutex to prevent deadlocks during complex API callback chains.
- Added support for serving static UI assets from the 'static/' directory.
- Implemented automated 'Content-Type: application/json' headers for all API routes.
- Simplified locking logic across all handlers.
@rbergen

rbergen commented May 15, 2026

Copy link
Copy Markdown
Collaborator

See comment on #101.

@rbergen

rbergen commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

CI still fails on this one, and I believe it has a genuine complaint:

Copying secrets.h.example to secrets.h...
Compiling main.cpp...
In file included from main.cpp:33:
./webserver.h:317:54: error: too many arguments to function call, expected single argument 'effect', have 2 arguments
  317 |                     effectsManager.AddEffect(effect, schedule);
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~         ^~~~~~~~
./interfaces.h:129:18: note: 'AddEffect' declared here
  129 |     virtual void AddEffect(shared_ptr<ILEDEffect> effect) = 0;
      |                  ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

@robertlipe

Copy link
Copy Markdown
Contributor Author

That was fixed three months ago, back in 2178d1a856dabb32371b1f94513b485cefc5e41a

 ndscpp  make -C tests && tests/tests
make: Nothing to be done for `all'.
Running main() from /private/tmp/googletest-20250808-4780-aa0gxy/googletest-1.17.0/googletest/src/gtest_main.cc
[==========] Running 9 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 9 tests from APITest
[ RUN ] APITest.GetController
[ OK ] APITest.GetController (3 ms)
[ RUN ] APITest.GetSockets
[ OK ] APITest.GetSockets (0 ms)
[ RUN ] APITest.GetSpecificSocket
[ OK ] APITest.GetSpecificSocket (0 ms)
[ RUN ] APITest.CanvasCRUD
[ OK ] APITest.CanvasCRUD (1 ms)
[ RUN ] APITest.CanvasFeatureOperations
[ OK ] APITest.CanvasFeatureOperations (0 ms)
[ RUN ] APITest.MultipleCanvasOperations
[ OK ] APITest.MultipleCanvasOperations (61 ms)
[ RUN ] APITest.MultipleFeatureOperations
[ OK ] APITest.MultipleFeatureOperations (61 ms)
[ RUN ] APITest.RapidCreationDeletion
[ OK ] APITest.RapidCreationDeletion (1349 ms)
[ RUN ] APITest.CanvasFeatureEffectWithSchedule
[ OK ] APITest.CanvasFeatureEffectWithSchedule (8 ms)
[----------] 9 tests from APITest (1487 ms total)

[----------] Global test environment tear-down
[==========] 9 tests from 1 test suite ran. (1487 ms total)
[ PASSED ] 9 tests.
 robertlipe   ndscpp   webserver-enhancements ≡  ?1 ~2   

Reconciled via Gemini...because my attention span isn't this long. This is unrealistically far back in history, but I'm committed to make this code better.

✦ I have resolved the branch issues, synced with the remote, and pushed the fix
to the webserver-enhancements branch.

Summary of Actions:

  1. Fixed Compilation Error: Applied the missing AddEffect signature update to
    interfaces.h and effectsmanager.h, restoring schedule support as intended.
  2. Verified Build: Confirmed that make now completes successfully.
  3. Synced & Pushed: Rebased the local webserver-enhancements branch on top of
    origin/webserver-enhancements to incorporate recent changes (including
    dependabot updates and merges from main) and pushed the updated branch.

The PR #104
(#104) should now reflect
these changes and pass the CI build.

@rbergen

rbergen commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

I'm closing this due to massive drift in main in the key target (webserver.h) due to #100. I'll note for the record that that PR was opened before this one, so the PRs were processed in the logical order.

@rbergen rbergen closed this Jun 21, 2026
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.

2 participants