Repository navigation
Conversation
The NPC grid used a hardcoded 2-column layout, so in the 3-column desktop dashboard each card ended up around 200px wide: the middle section was squeezed to zero and the name and the HP bar disappeared. The column count is now derived from the width actually available, dropping to fewer columns when the cards would go below the minimum readable width, and the GM action buttons use a compact 36px tap target instead of the 48px default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Renders a session with one NPC instance at 1568px and asserts the name and the HP bar keep a non-zero width. Fails against the previous hardcoded 2-column grid. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problema
No dashboard de sessão em desktop, os cards de "NPCs em Combate" apareciam cortados: só o ícone do NPC e os botões de ação ficavam visíveis, sem nome nem barra de HP.
Causa: o grid de NPCs usava
crossAxisCount: 2fixo. Dentro da coluna central do layout de 3 colunas (~414px), cada card ficava com ~199px. Descontando padding (32), avatar (44), espaçamento (16) e os trêsIconButtonde 48px (156), aExpandeddo meio recebia largura negativa e colapsava para zero, escondendo nome e HP.Solução
LayoutBuilder), reduzindo para menos colunas quando os cards ficariam abaixo da largura mínima legível (320px). O parâmetrocrossAxisCountviroumaxColumns: mobile continua com 1, desktop usa até 2 conforme couber.VisualDensity.compacte alvo de toque de 36px, liberando espaço para nome e HP em cards estreitos.Testes
Novo caso em
session_dashboard_screen_test.dart: renderiza a sessão com um NPC a 1568px de largura e verifica que nome e barra de HP mantêm largura maior que zero. Confirmado que o teste falha contra o código anterior.flutter analyze: sem issuesflutter test: 140 testes passandoValidação pendente
Correção verificada por teste de widget (geometria), não por inspeção visual no app rodando.
🤖 Generated with Claude Code