Skip to content

Commit 9218e2a

Browse files
Make settings modal more compact and remove static sections
- Remove 'LLM Configuration Issues?' troubleshooting section - Remove static 'Current Configuration' display in favor of input fields - Reduce modal width from 600px to 500px - Decrease padding, margins, and font sizes throughout - Make ServerStatus component more compact - Improve space efficiency while maintaining readability
1 parent 3278684 commit 9218e2a

File tree

4 files changed

+40
-94
lines changed

4 files changed

+40
-94
lines changed

example/src/components/ServerStatus.css

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
.server-status {
22
background: var(--card-bg);
33
border: 1px solid var(--border-color);
4-
border-radius: 8px;
5-
padding: 1.5rem;
6-
margin: 1rem 0;
7-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
4+
border-radius: 6px;
5+
padding: 1rem;
6+
margin: 0;
7+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
88
}
99

1010
.status-header {
1111
display: flex;
1212
justify-content: space-between;
1313
align-items: center;
14-
margin-bottom: 1rem;
15-
padding-bottom: 0.5rem;
14+
margin-bottom: 0.75rem;
15+
padding-bottom: 0.4rem;
1616
border-bottom: 1px solid var(--border-color);
1717
}
1818

1919
.status-header h3 {
2020
margin: 0;
2121
color: var(--text-primary);
22-
font-size: 1.1rem;
22+
font-size: 1rem;
2323
font-weight: 600;
2424
}
2525

2626
.status-controls {
2727
display: flex;
2828
align-items: center;
29-
gap: 1rem;
29+
gap: 0.75rem;
3030
}
3131

3232
.auto-refresh-toggle {
3333
display: flex;
3434
align-items: center;
35-
gap: 0.5rem;
36-
font-size: 0.9rem;
35+
gap: 0.4rem;
36+
font-size: 0.8rem;
3737
color: var(--text-secondary);
3838
cursor: pointer;
3939
user-select: none;
@@ -66,14 +66,14 @@
6666
.status-items {
6767
display: flex;
6868
flex-direction: column;
69-
gap: 0.75rem;
69+
gap: 0.5rem;
7070
}
7171

7272
.status-item {
7373
display: flex;
7474
justify-content: space-between;
7575
align-items: flex-start;
76-
padding: 0.5rem 0;
76+
padding: 0.3rem 0;
7777
border-bottom: 1px solid var(--border-light);
7878
}
7979

@@ -84,10 +84,11 @@
8484
.status-label {
8585
display: flex;
8686
align-items: center;
87-
gap: 0.5rem;
87+
gap: 0.4rem;
8888
font-weight: 500;
8989
color: var(--text-primary);
90-
min-width: 140px;
90+
min-width: 120px;
91+
font-size: 0.85rem;
9192
}
9293

9394
.status-icon {
@@ -101,14 +102,15 @@
101102
color: var(--text-secondary);
102103
max-width: 60%;
103104
word-break: break-word;
105+
font-size: 0.85rem;
104106
}
105107

106108
.url-value {
107109
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
108-
font-size: 0.85rem;
110+
font-size: 0.75rem;
109111
background: var(--code-bg);
110-
padding: 0.25rem 0.5rem;
111-
border-radius: 4px;
112+
padding: 0.2rem 0.4rem;
113+
border-radius: 3px;
112114
border: 1px solid var(--border-light);
113115
}
114116

example/src/components/ServerStatus.tsx

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -167,29 +167,9 @@ export const ServerStatus: React.FC<ServerStatusProps> = ({ settings, onRefresh
167167
)}
168168
</div>
169169

170-
{!status?.isConnected && (
171-
<div className="status-help">
172-
<p>💡 <strong>Connection Issues?</strong></p>
173-
<ul>
174-
<li>Make sure the agent server is running</li>
175-
<li>Check that the server URL is correct</li>
176-
<li>Verify the agent server API key if required</li>
177-
<li>Check for network connectivity issues</li>
178-
</ul>
179-
</div>
180-
)}
181-
182-
{status?.isConnected && status?.llmStatus === 'error' && (
183-
<div className="status-help">
184-
<p>💡 <strong>LLM Configuration Issues?</strong></p>
185-
<ul>
186-
<li>Verify your LLM API key is correct</li>
187-
<li>Check that the model name is supported</li>
188-
<li>Ensure you have sufficient API credits</li>
189-
<li>Check the agent server logs for more details</li>
190-
</ul>
191-
</div>
192-
)}
170+
171+
172+
193173
</div>
194174
);
195175
};

example/src/components/SettingsModal.css

Lines changed: 18 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
.modal-content {
1515
background: white;
16-
border-radius: 8px;
16+
border-radius: 6px;
1717
padding: 0;
1818
width: 90%;
19-
max-width: 600px;
19+
max-width: 500px;
2020
max-height: 90vh;
2121
overflow-y: auto;
2222
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
@@ -26,14 +26,14 @@
2626
display: flex;
2727
justify-content: space-between;
2828
align-items: center;
29-
padding: 1.5rem;
29+
padding: 1rem;
3030
border-bottom: 1px solid #e0e0e0;
3131
}
3232

3333
.modal-header h2 {
3434
margin: 0;
3535
color: #333;
36-
font-size: 1.5rem;
36+
font-size: 1.3rem;
3737
}
3838

3939
.close-button {
@@ -58,59 +58,33 @@
5858
}
5959

6060
.settings-status {
61-
padding: 1.5rem;
61+
padding: 1rem;
6262
border-bottom: 1px solid #e0e0e0;
6363
background-color: #f8f9fa;
6464
}
6565

66-
.current-settings {
67-
margin-bottom: 1.5rem;
68-
}
69-
70-
.current-settings h3 {
71-
margin: 0 0 1rem 0;
72-
color: #333;
73-
font-size: 1.1rem;
74-
}
75-
76-
.current-settings ul {
77-
list-style: none;
78-
padding: 0;
79-
margin: 0;
80-
}
81-
82-
.current-settings li {
83-
padding: 0.5rem 0;
84-
border-bottom: 1px solid #e0e0e0;
85-
font-size: 0.9rem;
86-
}
87-
88-
.current-settings li:last-child {
89-
border-bottom: none;
90-
}
91-
9266
.settings-form {
93-
padding: 1.5rem;
67+
padding: 1rem;
9468
}
9569

9670
.form-group {
97-
margin-bottom: 1.5rem;
71+
margin-bottom: 1rem;
9872
}
9973

10074
.form-group label {
10175
display: block;
102-
margin-bottom: 0.5rem;
76+
margin-bottom: 0.3rem;
10377
font-weight: 600;
10478
color: #333;
105-
font-size: 0.9rem;
79+
font-size: 0.85rem;
10680
}
10781

10882
.form-group input {
10983
width: 100%;
110-
padding: 0.75rem;
84+
padding: 0.6rem;
11185
border: 1px solid #ddd;
11286
border-radius: 4px;
113-
font-size: 1rem;
87+
font-size: 0.9rem;
11488
transition: border-color 0.2s, box-shadow 0.2s;
11589
box-sizing: border-box;
11690
}
@@ -129,25 +103,25 @@
129103
.error-message {
130104
display: block;
131105
color: #e74c3c;
132-
font-size: 0.8rem;
133-
margin-top: 0.25rem;
106+
font-size: 0.75rem;
107+
margin-top: 0.2rem;
134108
}
135109

136110
.form-actions {
137111
display: flex;
138-
gap: 1rem;
112+
gap: 0.75rem;
139113
justify-content: flex-end;
140-
margin-top: 2rem;
141-
padding-top: 1rem;
114+
margin-top: 1.5rem;
115+
padding-top: 0.75rem;
142116
border-top: 1px solid #e0e0e0;
143117
}
144118

145119
.cancel-button,
146120
.save-button {
147-
padding: 0.75rem 1.5rem;
121+
padding: 0.6rem 1.2rem;
148122
border: none;
149123
border-radius: 4px;
150-
font-size: 1rem;
124+
font-size: 0.9rem;
151125
cursor: pointer;
152126
transition: background-color 0.2s, transform 0.1s;
153127
}

example/src/components/SettingsModal.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,6 @@ export const SettingsModal: React.FC<SettingsModalProps> = ({
105105
</div>
106106

107107
<div className="settings-status">
108-
<div className="current-settings">
109-
<h3>Current Configuration:</h3>
110-
<ul>
111-
<li><strong>Agent Server URL:</strong> {initialSettings.agentServerUrl}</li>
112-
<li><strong>Model:</strong> {initialSettings.modelName}</li>
113-
<li><strong>LLM API Key:</strong> {initialSettings.apiKey ? '***configured***' : 'not set'}</li>
114-
<li><strong>Agent Server API Key:</strong> {initialSettings.agentServerApiKey ? '***configured***' : 'not set'}</li>
115-
</ul>
116-
</div>
117-
118108
<ServerStatus settings={initialSettings} />
119109
</div>
120110

0 commit comments

Comments
 (0)