-
Notifications
You must be signed in to change notification settings - Fork 12
Card view: archived sealed state + hide archived realms from write pickers #5364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lukemelia
merged 6 commits into
main
from
cs-11670-card-view-archived-sealed-state-hide-archived-realms-from
Jun 30, 2026
+209
−30
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
32f16da
Merge remote-tracking branch 'origin/cs-11664-sealed-enforcement-403-…
lukemelia fae86eb
Merge remote-tracking branch 'origin/cs-11665-enumeration-omits-archi…
lukemelia cda6700
Merge remote-tracking branch 'origin/cs-11664-sealed-enforcement-403-…
lukemelia dbeaac0
Render the sealed state for an archived realm in card view
lukemelia 2a23d77
Address review: drop ticket ref + name both seal-exempt public endpoints
e5caee2
Merge remote-tracking branch 'origin/main' into cs-11670-card-view-ar…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
packages/host/app/components/operator-mode/archived-realm-state.gts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| import type { TemplateOnlyComponent } from '@ember/component/template-only'; | ||
|
|
||
| import { CardHeader } from '@cardstack/boxel-ui/components'; | ||
| import type { MenuItem } from '@cardstack/boxel-ui/helpers'; | ||
| import { Lock } from '@cardstack/boxel-ui/icons'; | ||
|
|
||
| import type { CardErrorJSONAPI } from '@cardstack/host/services/store'; | ||
|
|
||
| interface Signature { | ||
| Args: { | ||
| error: CardErrorJSONAPI; | ||
| headerOptions?: { | ||
| isTopCard?: boolean; | ||
| moreOptionsMenuItems?: MenuItem[]; | ||
| onClose?: () => void; | ||
| }; | ||
| }; | ||
| Element: HTMLElement; | ||
| } | ||
|
|
||
| // Shown in place of card chrome when a realm responds 403 (archived). An | ||
| // archived realm is sealed for everyone, so there is no read-only browsing — | ||
| // the only way back in is to restore it. | ||
| const ArchivedRealmState: TemplateOnlyComponent<Signature> = <template> | ||
| <CardHeader | ||
| class='archived-header' | ||
| @cardTypeDisplayName='Workspace Archived' | ||
| @cardTypeIcon={{Lock}} | ||
| @isTopCard={{@headerOptions.isTopCard}} | ||
| @moreOptionsMenuItems={{@headerOptions.moreOptionsMenuItems}} | ||
| @onClose={{@headerOptions.onClose}} | ||
| ...attributes | ||
| /> | ||
| <div class='archived-realm-state' data-test-archived-realm-state> | ||
| <Lock class='icon' /> | ||
| <div class='message'> | ||
| <p class='headline'>This workspace is archived</p> | ||
| <p class='detail'> | ||
| Restore it from the workspace chooser, or ask an owner to restore it. | ||
| </p> | ||
| </div> | ||
| </div> | ||
| <style scoped> | ||
| .icon { | ||
| height: 100px; | ||
| width: 100px; | ||
| color: var(--boxel-400); | ||
| } | ||
| .archived-realm-state { | ||
| display: flex; | ||
| height: 100%; | ||
| align-content: center; | ||
| justify-content: center; | ||
| flex-wrap: wrap; | ||
| gap: var(--boxel-sp-xs); | ||
| padding: var(--boxel-sp); | ||
| } | ||
| .message { | ||
| width: 100%; | ||
| text-align: center; | ||
| text-wrap: pretty; | ||
| } | ||
| .headline { | ||
| margin: 0; | ||
| font: 600 var(--boxel-font); | ||
| } | ||
| .detail { | ||
| margin: var(--boxel-sp-xxs) 0 0; | ||
| color: var(--boxel-450); | ||
| font: var(--boxel-font-sm); | ||
| } | ||
| .archived-header { | ||
| min-height: var(--boxel-form-control-height); | ||
| background-color: var(--boxel-100); | ||
| box-shadow: 0 1px 0 0 rgba(0 0 0 / 15%); | ||
| } | ||
| </style> | ||
| </template>; | ||
|
|
||
| export default ArchivedRealmState; |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.