Skip to content

Commit 78f962c

Browse files
ZhiXiao-Linclaude
andauthored
fix(website): unify capability demos with Code TUI (#56)
Co-authored-by: Claude <claude@anthropic.com>
1 parent 7d67dcd commit 78f962c

7 files changed

Lines changed: 512 additions & 597 deletions

File tree

website/scripts/check-built-site.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,22 @@ for (const file of requiredFiles) {
5050

5151
const capabilityMarkers = [
5252
'a3s-capability-stories',
53+
'data-a3s-code-tui="hero"',
54+
'data-a3s-code-tui="capability-hitl"',
5355
'HITL',
5456
'PROGRESSIVE API',
5557
'RUNTIME TOOL',
5658
'CODE INTELLIGENCE',
5759
'CTX RECALL',
5860
];
5961

62+
const sharedTuiRegionMarkers = [
63+
'data-tui-region="titlebar"',
64+
'data-tui-region="terminal"',
65+
'data-tui-region="composer"',
66+
'data-tui-region="footer"',
67+
];
68+
6069
for (const homepage of ['index.html', 'en/index.html']) {
6170
const html = await readFile(path.join(outputRoot, homepage), 'utf8');
6271
for (const marker of capabilityMarkers) {
@@ -66,6 +75,15 @@ for (const homepage of ['index.html', 'en/index.html']) {
6675
);
6776
}
6877
}
78+
79+
for (const marker of sharedTuiRegionMarkers) {
80+
const count = html.split(marker).length - 1;
81+
if (count < 2) {
82+
throw new Error(
83+
`${homepage} must render the shared A3S Code TUI ${marker} region for both the hero and capability player`,
84+
);
85+
}
86+
}
6987
}
7088

7189
const brokenReferences = [];

website/theme/capability-responsive.css

Lines changed: 12 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,9 @@
1515
height: 31px;
1616
}
1717

18-
.a3s-capability-player-stage {
19-
padding-right: 20px;
20-
padding-left: 20px;
21-
gap: 16px;
22-
grid-template-columns: 120px minmax(0, 1fr);
23-
}
24-
2518
.a3s-capability-player-intro {
2619
align-items: flex-start;
27-
flex-direction: column;
20+
grid-template-columns: 1fr;
2821
gap: 14px;
2922
}
3023
}
@@ -37,13 +30,12 @@
3730

3831
.a3s-capability-console {
3932
min-height: 0;
33+
gap: 14px;
4034
grid-template-columns: 1fr;
4135
}
4236

4337
.a3s-capability-selector {
4438
overflow-x: auto;
45-
border-right: 0;
46-
border-bottom: 1px solid #29313c;
4739
flex-direction: row;
4840
scrollbar-width: none;
4941
}
@@ -76,7 +68,7 @@
7668
}
7769

7870
.a3s-capability-player-stage {
79-
min-height: 460px;
71+
min-height: 390px;
8072
}
8173
}
8274

@@ -86,10 +78,8 @@
8678
padding-bottom: 76px;
8779
}
8880

89-
.a3s-capability-console {
90-
border-right: 0;
91-
border-left: 0;
92-
border-radius: 0;
81+
.a3s-capability-player.a3s-runtime-inspector {
82+
min-height: 680px;
9383
}
9484

9585
.a3s-capability-selector > button {
@@ -112,50 +102,20 @@
112102
}
113103

114104
.a3s-capability-player-intro {
115-
padding: 22px 18px 20px;
105+
gap: 9px;
116106
}
117107

118108
.a3s-capability-player-intro h3 {
119-
font-size: 23px;
109+
font-size: 16px;
120110
}
121111

122112
.a3s-capability-player-stage {
123-
min-height: 0;
124-
padding: 16px 12px 18px;
125-
grid-template-columns: 1fr;
126-
}
127-
128-
.a3s-capability-stage-rail {
129-
display: grid;
130-
padding: 0 0 4px;
131-
grid-template-columns: repeat(4, minmax(0, 1fr));
132-
}
133-
134-
.a3s-capability-stage-rail li {
135-
min-height: 52px;
136-
padding-right: 8px;
137-
grid-template-columns: 19px minmax(0, 1fr);
138-
gap: 5px;
139-
}
140-
141-
.a3s-capability-stage-rail li::after {
142-
width: auto;
143-
height: 1px;
144-
inset: 9px 0 auto 20px;
145-
}
146-
147-
.a3s-capability-stage-rail li > i {
148-
width: 19px;
149-
height: 19px;
150-
}
151-
152-
.a3s-capability-stage-rail li > span {
153-
font-size: 7px;
113+
min-height: 360px;
154114
}
155115

156116
.a3s-capability-scene {
157-
min-height: 390px;
158-
padding: 12px;
117+
min-height: 350px;
118+
padding: 0;
159119
}
160120

161121
.a3s-capability-call,
@@ -217,14 +177,14 @@
217177
grid-template-columns: 1fr;
218178
}
219179

220-
.a3s-capability-player-footer > div code:nth-child(n + 3) {
180+
.a3s-capability-tui-tag:nth-of-type(n + 4) {
221181
display: none;
222182
}
223183
}
224184

225185
@media (prefers-reduced-motion: reduce) {
226186
.a3s-capability-player-stage,
227-
.a3s-capability-stage-rail li.is-active > i,
187+
.a3s-capability-tui-plan li.is-active > i,
228188
.a3s-progressive-steps .is-active i,
229189
.a3s-progressive-view.is-ready,
230190
.a3s-runtime-batch > div.is-running > i b,

website/theme/capability-scenes.css

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -608,37 +608,6 @@
608608
font-size: 6px;
609609
}
610610

611-
.a3s-capability-player-footer {
612-
display: flex;
613-
min-width: 0;
614-
padding: 0 16px;
615-
border-top: 1px solid #29313c;
616-
background: rgba(9, 13, 17, 0.92);
617-
color: #596675;
618-
align-items: center;
619-
justify-content: space-between;
620-
gap: 12px;
621-
font-family: var(--a3s-mono);
622-
font-size: 7px;
623-
}
624-
625-
.a3s-capability-player-footer > div {
626-
display: flex;
627-
min-width: 0;
628-
overflow: hidden;
629-
justify-content: flex-end;
630-
gap: 5px;
631-
}
632-
633-
.a3s-capability-player-footer code {
634-
padding: 3px 5px;
635-
border: 1px solid #2b3540;
636-
border-radius: 3px;
637-
color: #697786;
638-
font-size: 6px;
639-
white-space: nowrap;
640-
}
641-
642611
@keyframes a3s-capability-story-in {
643612
from {
644613
opacity: 0;

0 commit comments

Comments
 (0)