Repository navigation
feat(plugin-map): a map view with no style draws the deployment's default map style before demotiles - #26326
Conversation
Adds HostMapStyleContext to @object-ui/react, the seam the Console uses to hand the deployment's default map style to the lazily loaded map. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
… map renderer Also adds the element.map.styleFailedDeployment notice in all ten packs. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
…demo style A map view with no style of its own reads the host's style through useHostMapStyle(), and a failed deployment style gets its own notice. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
…p-style-runtime-fallback
Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
…p-style-runtime-fallback # Conflicts: # scripts/sdui-manifest.sources/i18n.json # scripts/sdui-manifest.sources/react.json
…d tree Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
|
ACCEPT · seat 2 · 2026-10-26T21:12Z · PR #26326 head
Open question: the spec's Not armed yet: the PR is |
…p-style-runtime-fallback Conflicts resolved: scripts/sdui-manifest.sources/i18n.json and react.json taken from main (re-recorded in the next commit). Locale packs and runtime-config.ts auto-merged with both sides' keys. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
…d tree Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
…p-style-runtime-fallback Conflict resolved: scripts/sdui-manifest.sources/react.json taken from main (re-recorded in the next commit). Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
维护者速读改了什么:地图视图没有自带样式时,先画部署级默认地图样式(运营设置的 OS_CONSOLE_MAP_STYLE_URL,经 runtime-config 的 mapStyleUrl 下发),没有再退回公共演示瓦片;该样式加载失败时,提示语点名“本部署的默认样式”,不再误指公共瓦片。 席位核对seat 2 · 2026-10-27T01:21Z · head
|
…p-style-runtime-fallback # Conflicts: # scripts/sdui-manifest.sources/i18n.json # scripts/sdui-manifest.sources/plugin-map.json # scripts/sdui-manifest.sources/react.json
维护者速读改了什么:地图视图没有自带样式时,先画部署级默认地图样式(运营设置的 OS_CONSOLE_MAP_STYLE_URL,经 runtime-config 的 mapStyleUrl 下发),没有再退回公共演示瓦片;该样式加载失败时,提示语点名“本部署的默认样式”,不再误指公共瓦片。 席位核对seat 2 · 2026-10-27T04:16Z · head
|
Fixes #26163
Clause-②: no
Metadata-protocol: none
The ui half of #26001. A map view that declares no style of its own now draws the deployment's default style, the runtime-config
mapStyleUrlthat #26162 serves from the operator'sOS_CONSOLE_MAP_STYLE_URL, before it falls back to the public demo style.What changed
A map draws the first style it finds, in this order:
mapStyle, thenmap.style(unchanged);DEFAULT_MAP_STYLE, the public demo style (unchanged).@object-ui/react: a newHostMapStyleContextwithHostMapStyleProvideranduseHostMapStyle(). Outside a provider, or with no style given, the hook answersundefined.@object-ui/plugin-map:ObjectMapreadsuseHostMapStyle()aftermapConfig.style. Its public exports are unchanged. When the deployment's style fails to load, the record-list notice now has its own text: the default map style set for this deployment could not be loaded, ask your administrator to check it. Before this change that case would have shown the default-style notice, which blames the public default tiles that the map never drew.@object-ui/app-shell:AppShellRuntimeConfig.mapStyleUrl?: stringis read from the top-levelmapStyleUrl. It is re-read from each payload, so absent, empty or non-string values withdraw it.ConsoleShellmountsHostMapStyleProviderwithgetRuntimeConfig().mapStyleUrl, directly insideHostNavigationBridge.@object-ui/i18n: one key,element.map.styleFailedDeployment, in all ten packs.plugin-map's README and incontent/docs/plugins/plugin-map.mdx.scripts/sdui-manifest.sources/{i18n,plugin-map,react}.jsonre-recorded. The artefact itself did not move.The seam: a context in
@object-ui/react, not a prop and not a plugin-map exportObjectMapreaches the page throughComponentRegistry(object-map, rendered byObjectView/ListView/SchemaRenderer). The Console never builds that element, so it has nowhere to pass a prop.HostNavigationContextexists for the same reason, andConsoleShell's own comment says so.plugin-map. The Console loads@object-ui/plugin-maplazily (registerLazyinapps/console/src/register-plugins.ts) to keep maplibre-gl out of the first bundle. A provider imported from the plugin's single side-effectful entry would load the plugin, and maplibre-gl with it, on every page.HostNavigationContextin@object-ui/react. Both the plugin and the app-shell already depend on that package, so neither gains a dependency, andplugin-mapstill does not depend onapp-shell.plugin-map's public surface is unchanged.@object-ui/reactgains three exports: the context, the provider and the hook.No spec key and no Setup setting were added (ruling A on #26001).
Tests
Pinned in
ObjectMap.deploymentStyle-26163.test.tsx, driven throughHostMapStyleProvider:mapblock and for the flat ListView form.mapStylewins, and so doesmap.style.ConsoleShell.mapStyle-26163.test.tsxchecks that the console supplies the served value, and supplies nothing when the runtime serves nomapStyleUrl.runtime-config.test.tsgains amapStyleUrlblock covering read, absent, empty, whitespace, non-string, nested underbranding, and withdrawn.Red first, at the pre-change
ObjectMap.tsx(10e80921) with the tests in place, under the verify lock:After the restore, the file matched its HEAD blob (
git diff HEADempty), and the green leg readTests 65 passed (65). The env-unset and view-wins cases pass on both legs, because they pin behaviour that already existed.Ablation of the Console injection: replacing
styleUrl={getRuntimeConfig().mapStyleUrl}withstyleUrl={undefined}turnshands the served mapStyleUrl to every renderer below itred (1 failed, 1 passed). After the restore, the file's hash matched HEAD.Local verification at head
3f5e3446These were run after merging
origin/main(merge commit10e1f91a), underscripts/pm/os-verify-lock.sh:pnpm exec vitest run packages/plugin-map/ packages/i18n/ packages/react/src/contextplus the threeConsoleShelltests (hostNavigation,mapStyle-26163,notifications),runtime-config.test.ts,ObjectView.mapFlatten.test.tsxandInterfaceListPage.mapConfig.test.tsx. Result:Test Files 149 passed (149),Tests 1862 passed, 13 skipped.pnpm run type-checkinplugin-map,react,i18nandapp-shell: all exit 0 with 0 TS errors. This was run afterturbo run build --filter='@object-ui/app-shell^...', which completed 64 of 64 tasks.node scripts/gen-sdui-manifest-node.mjsre-recordedi18n,plugin-mapandreact, and the artefact sha256 did not change.node scripts/check-sdui-manifest.mjsexits 0.eslinton the changed files: 0 errors (warnings only, of the same kinds the neighbouring files already carry).pnpm --dir ui run check:new-line-citations: 0 new citations.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 45 commands. 44 exited 0.pnpm check:type-check-debtis NOT MEASURED: it exited 3 (PREREQUISITE NOT MET) because its closure build timed out in the shared verify-lock queue, so CI's run of it is the reading.--ranreconciliation:45 derived, 44 run, 1 NOT-MEASURED, 0 UNRUN.Acceptance notes
object-mapmapStyleinput description is the spec row's describe, verbatim: "overriding the public demo tiles". With a deployment default it now overrides that too. The text lives in@objectstack/spec, outside this card, so it was left as is. The README and docs rows are updated.docs/qa/platform-checklist/RUNNER.mdrecords a QA reading that the map uses demotiles unless the view declares a style. That reading is historical, tied to its pin, and was left as is.OS_CONSOLE_MAP_STYLE_URLis now a second one. The translated text was left unchanged.Generated by Claude Code