Repository navigation
Fold navigation and services back into the runtime frontend - #52
Merged
Merged
Conversation
Both libraries were split out so that a second frontend could link them instead of reimplementing them. That frontend no longer exists: main is plain V8 again, and the unibind route keeps a single runtime frontend over either engine. Neither backend uses them; runtime is their only consumer, and the tests compile the sources they need directly. Keeping them apart cost two projects, their include-path, solution and glue entries, and a special include spelling for navigation. They now live under src/frontends/runtime/components/, one directory per component beside console/, drawing/, gameloop/ and the rest: - navigation/: the A* pathfinder and the level-exit finder; - analytics/, characterstate/, dde/, profile/, update/: the bot's background services, which Host starts and stops. The namespaces follow the project/subdirectory layout, d2bs::runtime::<component>, as the other components already do. Code inside d2bs::runtime names them bare (profile::Switch); the bindings in d2bs::api write runtime::profile::Load. The two libraries' dependency rules become directory rules in CLAUDE.md: - navigation/ uses contract + utils only; - the service components never touch api/, V8 or the script engine. The test build compiles Pathfinder.cpp without V8 on the include path, which still catches the rule that matters most. The enum names for the moved enumerations are regenerated into RuntimeEnumNames. CLAUDE.md, the README and the design docs are updated for the new paths, and CLAUDE.md's tree now names components/engine/ (it still said v8/). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A namespace says where its code lives: d2bs::<project>::<subdirectory>, with the contract (d2bs::game, d2bs::config) as the one exception. Grouping directories such as components/ do not appear, directories may split into purpose-named sub-namespaces, and code never sits in a parent's namespace. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 26, 2026
Two comments still named services/ and navigation as projects, the Pathfinder.h alias comment named a namespace that no longer exists, and ReloadPathsForProfile's local `profile` shadowed the profile:: namespace it was initialised from. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Folds the
navigationandserviceslibraries back into the runtime frontend.Why
Both were split out so that a second frontend could link them instead of reimplementing them. That frontend isn't coming: main is plain V8 again (#49), and the unibind route keeps a single runtime frontend over either engine. Meanwhile:
runtimeis their only consumer;Pathfinder.cpp,ProfileService.cpp) directly.Keeping them separate cost two projects, their include-path, solution and glue entries, and a special include spelling for navigation.
Where things went
Each piece becomes a component under
src/frontends/runtime/components/, besideconsole/,drawing/,gameloop/and the rest:src/navigation/(pathfinder, exit finder)components/navigation/d2bs::runtime::navigationsrc/services/analytics/components/analytics/d2bs::runtime::analyticssrc/services/characterstate/components/characterstate/d2bs::runtime::characterstatesrc/services/dde/components/dde/d2bs::runtime::ddesrc/services/profile/components/profile/d2bs::runtime::profilesrc/services/update/components/update/d2bs::runtime::updateThey aren't grouped under a
services/folder:Hoststarts and stops them like any other component, and a grouping folder would only add a namespace level.Namespaces follow
d2bs::<project>::<subdirectory>, as the other runtime components already do. Code insided2bs::runtimenames them bare (profile::Switch), and the bindings ind2bs::apiwriteruntime::profile::Load. Bringing the rest of the tree into line with that scheme (d2bs::api, events and script types in bared2bs, core, the backends) is the follow-up PR.What else changes
navigation.vcxprojandservices.vcxprojare deleted, along with their solution, runtime and glue entries. The tests compile the moved sources from their new paths.RuntimeEnumNames. All 51 enumerations keep their names.CLAUDE.md.navigation/uses contract + utils only, and the service components never touchapi/, V8 or the script engine. The compiler no longer enforces these, but the test build still compilesPathfinder.cppwithout V8 on its include path, which catches the rule that matters most.CLAUDE.mdwrites the scheme down:d2bs::<project>::<subdirectory>, with the contract (d2bs::game,d2bs::config) as the one exception. Grouping directories such ascomponents/don't appear, and a directory may split its code into purpose-named sub-namespaces.CLAUDE.md(tree, build targets, linking diagram, include paths, dependency rules), the README and four design docs are updated for the new paths.CLAUDE.md's tree now namescomponents/engine/; it still saidv8/.Testing
build.ps1 ReleaseandRelease -Platform x64succeed.build.ps1 testpasses 157/157.build.ps1 check-formatis clean.gen_enum_names.py --checkis up to date.🤖 Generated with Claude Code