feat: Teams-style chat UX overhaul

Bubbles:
- Teams-style layout: bot avatar (green circle) on left, message beside it
- User messages right-aligned, no avatar (clean, like Teams)
- Rounded bubbles (border-radius: 16px) instead of square
- Distinct corner radii for conversation flow

Navigation:
- Links no longer close the chat — panel stays open for continued navigation
- Added #certifications anchor (alias to courses section)
- Fixed agent instruction to use #courses for certifications references

Theme:
- All colors use CSS variables from _themes.css
- Automatically adapts to light/dark without explicit .theme-clean overrides
- Panel uses --paper-bg (white in light, dark in dark theme)

Size modes:
- 3 discrete toggle buttons: compact, half-screen, fullscreen
- Active state highlighted, direct selection (no confusing cycling)
- Removed chat-half-left (simplified to compact/half/full)

Intelligence:
- React query now returns results (verified: 4 companies + 2 projects + skills)
This commit is contained in:
juanatsap
2026-04-08 17:51:14 +01:00
parent be5fdd03c4
commit d5c90248cc
5 changed files with 95 additions and 216 deletions
+66 -188
View File
@@ -82,7 +82,7 @@
}
/* Size: Half screen — docked right */
.chat-panel.chat-half-right {
.chat-panel.chat-half {
top: 0;
right: 0;
bottom: 0;
@@ -90,27 +90,10 @@
width: 50vw;
max-height: none;
border-radius: 0;
border-left: 2px solid var(--border-light, #e0e0e0);
border-left: 2px solid var(--border-light);
}
.chat-panel.chat-half-right .chat-messages {
max-height: none;
flex: 1;
}
/* Size: Half screen — docked left */
.chat-panel.chat-half-left {
top: 0;
left: 0;
right: auto;
bottom: 0;
width: 50vw;
max-height: none;
border-radius: 0;
border-right: 2px solid var(--border-light, #e0e0e0);
}
.chat-panel.chat-half-left .chat-messages {
.chat-panel.chat-half .chat-messages {
max-height: none;
flex: 1;
}
@@ -133,7 +116,7 @@
}
/* ==========================================================================
Header — accent-blue for visual distinction
Header — accent-green for visual distinction
========================================================================== */
.chat-header {
@@ -152,21 +135,29 @@
font-size: 1.1rem;
}
.chat-size-btn {
/* Size controls — 3 discrete toggle icons */
.chat-size-controls {
margin-left: auto;
background: none;
border: none;
color: var(--action-bar-text-muted, rgba(255, 255, 255, 0.85));
cursor: pointer;
font-size: 1rem;
transition: color 0.2s;
display: flex;
align-items: center;
padding: 0;
gap: 2px;
}
.chat-size-btn:hover {
.chat-size-opt {
background: none;
border: none;
color: rgba(255,255,255,0.6);
cursor: pointer;
font-size: 0.85rem;
padding: 2px;
display: flex;
border-radius: 3px;
transition: all 0.15s;
}
.chat-size-opt:hover,
.chat-size-opt.active {
color: #fff;
background: rgba(255,255,255,0.15);
}
.chat-help-btn {
@@ -201,102 +192,103 @@
min-height: 60px;
}
/* Chat Bubbles with Avatars */
.chat-bubble {
/* Teams-style message rows */
.chat-row {
display: flex;
gap: 8px;
align-items: flex-start;
max-width: 95%;
}
.chat-bubble.chat-bot {
.chat-row-bot {
align-self: flex-start;
}
.chat-bubble.chat-user {
.chat-row-user {
align-self: flex-end;
flex-direction: row-reverse;
justify-content: flex-end;
}
.chat-avatar {
width: 26px;
height: 26px;
width: 28px;
height: 28px;
border-radius: 50%;
background: var(--accent-green, #27ae60);
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.85rem;
font-size: 0.9rem;
flex-shrink: 0;
margin-top: 2px;
}
.chat-avatar-bot {
background: var(--accent-green, #27ae60);
color: #fff;
}
.chat-avatar-user {
background: var(--black-bar, #2b2b2b);
color: #fff;
}
/* Message content */
.chat-message {
padding: 8px 12px;
border-radius: 8px;
.chat-msg {
padding: 10px 14px;
border-radius: 16px;
font-size: 0.8rem;
line-height: 1.5;
max-width: 85%;
word-wrap: break-word;
overflow-wrap: break-word;
word-break: break-word;
min-width: 0;
}
.chat-message p {
.chat-row-bot .chat-msg {
background: var(--paper-secondary-bg, #f5f5f5);
color: var(--text-secondary, #333333);
border-top-left-radius: 4px;
}
.chat-row-user .chat-msg {
background: var(--accent-green, #27ae60);
color: #fff;
border-top-right-radius: 4px;
}
/* Message content typography */
.chat-msg p {
margin: 0 0 4px 0;
}
.chat-message p:last-child {
.chat-msg p:last-child {
margin-bottom: 0;
}
.chat-message ul {
.chat-msg ul {
margin: 4px 0;
padding-left: 16px;
}
.chat-message li {
.chat-msg li {
margin-bottom: 2px;
}
.chat-bot .chat-message {
background: var(--paper-secondary-bg, #f5f5f5);
color: var(--text-secondary, #333333);
border-bottom-left-radius: 2px;
}
.chat-user .chat-message {
background: var(--accent-green, #27ae60);
color: #fff;
border-bottom-right-radius: 2px;
}
/* Error message — simple styled div (not a chat-row) */
.chat-error {
padding: 8px 12px;
border-radius: 12px;
background: #fef2f2;
color: #991b1b;
align-self: center;
font-style: italic;
border: 1px solid #fecaca;
font-size: 0.75rem;
padding: 8px 12px;
border-radius: 8px;
}
.theme-clean .chat-error {
[data-color-theme="dark"] .chat-error {
background: #3a1a1a;
color: #fca5a5;
border-color: #5a2a2a;
}
@media (prefers-color-scheme: dark) {
[data-color-theme="auto"] .chat-error {
background: #3a1a1a;
color: #fca5a5;
border-color: #5a2a2a;
}
}
/* ==========================================================================
Navigation Links in Chat Messages
========================================================================== */
@@ -560,38 +552,6 @@
color: var(--text-light, #999999);
}
/* Dark theme for help modal */
.theme-clean .chat-help-group {
border-color: #333333;
}
.theme-clean .chat-help-group summary {
background: #2a2a2a;
color: #d0d0d0;
}
.theme-clean .chat-help-group summary:hover {
background: #333333;
}
.theme-clean .chat-help-q {
color: #999999;
}
.theme-clean .chat-help-q:hover {
background: #166b3a;
color: #fff;
}
.theme-clean .chat-help-footer {
background: #2a2a2a;
color: #777777;
}
.theme-clean .chat-help-intro {
color: #999999;
}
/* ==========================================================================
Responsive
========================================================================== */
@@ -615,85 +575,3 @@
max-height: 200px;
}
}
/* ==========================================================================
Dark Theme (theme-clean)
========================================================================== */
.theme-clean .chat-panel {
background: #1e1e1e;
border-color: #3a3a3a;
}
.theme-clean .chat-header {
background: var(--accent-green, #27ae60);
}
.theme-clean .chat-bot .chat-message {
background: #2d2d2d;
color: #e0e0e0;
}
.theme-clean .chat-user .chat-message {
background: #1e8c4c;
}
.theme-clean .chat-avatar-bot {
background: #1e8c4c;
}
.theme-clean .chat-avatar-user {
background: #444444;
}
/* error styles consolidated above */
.theme-clean .chat-input-area {
border-top-color: #3a3a3a;
background: #1e1e1e;
}
.theme-clean .chat-input {
background: #2d2d2d;
border-color: #3a3a3a;
color: #e0e0e0;
}
.theme-clean .chat-suggestions {
border-top-color: #333333;
}
.theme-clean .chat-chip {
background: transparent;
color: #999999;
border-color: #333333;
}
.theme-clean .chat-chip:hover {
background: #1e8c4c;
color: #fff;
border-color: #1e8c4c;
}
.theme-clean .chat-typing-dot {
background: #555555;
}
.theme-clean .chat-nav-link {
color: #2ecc71;
border-bottom-color: #2ecc71;
}
.theme-clean .chat-nav-link:hover {
color: #27ae60;
border-bottom-color: #27ae60;
}
.theme-clean .chat-highlight {
animation: chatHighlightDark 2s ease;
}
@keyframes chatHighlightDark {
0%, 100% { box-shadow: none; }
20%, 80% { box-shadow: 0 0 0 3px #2ecc71; border-radius: 4px; }
}