fix(web): restore 3-column NPC chat modal layout for desktop

- Fixed grid layout not applying to modal content (grid was on wrong parent element)
- Applied grid to .npc-chat-container instead of .npc-modal-body--three-col
- Removed htmx-indicator class from history panel (was causing content to disappear)
- Made history loading indicator visible by default
- Updated responsive breakpoints to target correct selectors
- Added warning to HTMX_PATTERNS.md about htmx-indicator hidden behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-25 22:16:33 -06:00
parent 52b199ff10
commit 16171dc34a
3 changed files with 32 additions and 20 deletions

View File

@@ -1436,10 +1436,28 @@
/* 3-column layout for chat modal with history sidebar */
.npc-modal-body--three-col {
padding: 0; /* Let container handle padding */
max-height: 70vh;
}
/* Apply grid to the actual container holding the three columns */
.npc-modal-body--three-col .npc-chat-container {
display: grid;
grid-template-columns: 200px 1fr 280px; /* Profile | Chat | History */
gap: 1rem;
max-height: 70vh;
padding: 1rem 1.25rem;
height: 100%;
}
/* Override hardcoded widths for grid children - let grid define sizes */
.npc-modal-body--three-col .npc-profile {
width: auto;
}
/* Ensure history panel is visible in modal grid */
.npc-modal-body--three-col .npc-history-panel {
min-height: 200px;
overflow-y: auto;
}
/* NPC Profile (Left Column) */
@@ -1699,24 +1717,13 @@
font-style: italic;
}
/* HTMX Loading Indicator */
/* HTMX Loading Indicator - visible by default, replaced by HTMX response */
.history-loading {
text-align: center;
color: var(--text-muted);
font-size: 0.875rem;
padding: 1rem 0;
font-style: italic;
display: none;
}
/* Show loading indicator when HTMX is making a request */
.htmx-indicator.htmx-request .history-loading {
display: block;
}
/* Hide other content while loading */
.htmx-indicator.htmx-request > *:not(.history-loading) {
opacity: 0.5;
}
/* Responsive NPC Modal */
@@ -1763,20 +1770,23 @@
/* Responsive: 3-column modal stacks on smaller screens */
@media (max-width: 1024px) {
.npc-modal-body--three-col {
.npc-modal-body--three-col .npc-chat-container {
grid-template-columns: 1fr; /* Single column */
grid-template-rows: auto 1fr auto;
}
.npc-profile {
.npc-modal-body--three-col .npc-profile {
order: 1;
width: 100%;
flex-direction: row;
flex-wrap: wrap;
}
.npc-conversation {
.npc-modal-body--three-col .npc-conversation {
order: 2;
}
.npc-history-panel {
.npc-modal-body--three-col .npc-history-panel {
order: 3;
border-left: none;
border-top: 1px solid var(--play-border);