Repository navigation
PL-0504: Studio Design library (conflict-safe drafts, checkout, release) - #109
Merged
Merged
Conversation
…kout and release Core DesignLibrary helper: create, checkout/checkin, save with expected_version and one Idempotency-Key per logical edit (reused only on a retry without a definite answer), release; 409 version_conflict and 423 checked_out_by_other become a DesignConflict naming the newer version or the holder. Studio page under DESIGN with Reload latest after a conflict; workers hold only the core client and a parented QObject bridge. Tests run against a real local PackLab Server. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…current key loss M1: DesignLibrary.save takes assets; the page sends the head revision's assets. M2: idempotency keys are popped safely; the page runs one request at a time. L1: a no-answer (0/5xx) message says a retry of the same action is applied once. L2: checkout/checkin conflicts are worded by action. L3: the status line shows the ID token's name (display only) or no identity. L4: release checks the metric status locally. L5: one atomic server.json helper for Warehouse and Design pages. L6: page-level lost-answer and asset-keeping tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…esign-client # Conflicts: # apps/windows-studio/src/packlab_studio/warehouse_view.py
Sekiph82
added a commit
that referenced
this pull request
Dec 3, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
PL-0504 (desktop side). The server side was already merged.
core/src/packlab_core/design_library.py:DesignLibrarylists, creates, checks out and in, saves drafts withexpected_version, and releases. Each logical edit gets one Idempotency-Key. The key is reused only when the same request is sent again after no definite answer (status 0 or 5xx). The server's 409version_conflictand 423checked_out_by_otheranswers becomeDesignConflict, which carriesserver_versionorholder. Nothing is ever overwritten silently.apps/windows-studio/src/packlab_studio/design_library_view.py: a new "Design Library" page in the DESIGN group. It sharesserver.json(server address and issuer) with the Warehouse page. Sign-in happens in the browser and lasts for this session only; it is not saved, so the two pages never rotate the same refresh token. The page shows drafts for the design role and has Check out, Check in, Save draft, Reload latest and Release buttons. Release offers only DESIGN_NOMINAL or METRIC_UNVERIFIED. Saves always use the version that was loaded into the editor; a list refresh never changes it. Worker threads hold only the core client and the parented QObject bridge, never a widget.navigation.py:Route.DESIGN_LIBRARYplus its factory.i18n.py: Turkish for every new string.Tests (they run against a real local server with two design users and one warehouse observer): a second editor gets a conflict; a checkout held by another user is refused; a retry with the same key is applied once; a released revision is immutable; the observer sees no drafts and gets 403 on edit. The page test covers the whole flow, and the page fits 1280x720 in Turkish.
Known limits: the page's sign-in is not saved across restarts; there is no force check-in in the UI (the admin can use the API); only the payload
notecan be edited (the server has no rename endpoint); no assets are attached.🤖 Generated with Claude Code