Repository navigation
feat: read desks from assets behind use_desk_assets - #646
Merged
Merged
Conversation
assets returns a next_page link on the first result (like get_members). Adds the Place::DeskSource mixin for reading desks from assets or metadata. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Single placeos_desk_metadata built from level_desks, with specs for metadata and asset modes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Find the scanned desk in level_desks; specs cover metadata and asset modes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
map_ids built from building_desks so booking map_ids resolve from assets or metadata Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
booking types mapped to desks cache bookable ids from building_desks, other types still use metadata Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
users_with_invalid_desk_bookings uses building_desks groups and returns the users it finds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
level desk ids and desk_id_mappings come from assets or metadata, other level metadata unchanged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
desk_ids maps desk id to desk_id_key via Desk#value, cache cleared on settings change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
allocation changes are written with update_asset in assets mode, metadata write deprecated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tool Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
desks can grant multiple whitelisted security groups (security_system_groups) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
assigned desks come from building_desks, removing the per level metadata lookup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gobright desk names and departments come from desk other_data, desks without a gobright name are skipped Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
desk names come from desk assets when use_desk_assets is set (auto_release, at_capacity_mailer, booking_notifier) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Desk listing, counts, map ids and bookings use level_desks; LLM desk responses keep the same slim shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Desk listing, counts, map ids and bookings use level_desks; LLM desk responses keep the same slim shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
Closes #645
Desks are moving from
deskszone metadata to_DESKS_assets (initmigrate:desk_assets). This PR moves every driver that reads desk metadata onto a shared mixin. One setting,use_desk_assets, switches the source of truth, so production systems can move over one at a time.Changes
assetstakeslimit/next_page. Likeget_members, the first result carries anext_pagelink, which callers pass back to fetch the next page.update_asset(PATCH/api/engine/v2/assets/:id).Place::DeskSource(drivers/place/desk_source.cr)level_desksandbuilding_desksreturn oneDeskshape from either source.floorsense_id,gobright_desk_name, …) come fromother_datain both modes, throughdesk[key]?/desk.value(key).@[Deprecated("desk metadata: set use_desk_assets and remove")].use_desk_assets: falseby default and one commit per driver:Rollout
task migrate:desk_assetsfrom init. Unmapped desk keys are kept inAsset#other_data.use_desk_assets: trueon the org zone. The setting is inherited by every driver.Cleanup
Running
grep -rn 'Deprecated("desk metadata' driversfinds every legacy path:desk_source.cr(×2),desk/allocations.cr(metadata write) andbookings/asset_name_resolver.cr. Compiling any driver that still uses them prints a deprecation warning.Review
17 tested, 0 failures, 0 timeouts, 0 without specacross every touched driver. Each spec covers both modes, and assets mode includes a two-page response. Empty spec stubs were built out for custom_bookings_sync, desk/allocations, grant_area_access, orbility/approvals and area_management (whose spec used to test AreaCount).map_idin assets mode, which the migration fills from the original desk id). The external desk management tool doesn't see Asset#ids. Writes go to the assets.desks, thesync_blockedstatus andsecurity_zone_reportnow hold arrays of groups instead of a single string.map_id, which is the floor-plan id rather thanasset-xxx.idfalls back tomap_idgroupsis treated as emptybookable: "FALSE"means not bookablegobright_desk_nameskips that desk rather than raisingDeskDetails, soother_datanever reaches the LLM.🤖 Generated with Claude Code