fix(studio): make remaining non-copyable error sites copyable
Some checks failed
Security / Security check (push) Failing after 1s
Some checks failed
Security / Security check (push) Failing after 1s
Audit sweep after the System-AI fix: the Settings dialog rendered its two _error states as a bare Text (hub-endpoint save, default-scope edit), and the Audit live-status bar showed the raw load failure in a non-selectable Text (the only place that failure surfaces — the empty-state below shows just a generic hint). Route the Settings errors through ChainErrorBox and make the Audit disconnected text a SelectableText. Errors must always be clipboard-copyable. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
7f59334176
commit
8a40e8e315
2 changed files with 23 additions and 17 deletions
|
|
@ -436,12 +436,26 @@ class _LiveStatusBar extends StatelessWidget {
|
||||||
pulsing: live,
|
pulsing: live,
|
||||||
),
|
),
|
||||||
const SizedBox(width: ChainSpace.sm),
|
const SizedBox(width: ChainSpace.sm),
|
||||||
Text(
|
// Disconnected → SelectableText so the raw error is copyable
|
||||||
live ? l.auditLiveStatus(eventCount) : l.auditDisconnected(error!),
|
// (it's the only place the underlying failure is surfaced;
|
||||||
style: theme.textTheme.bodySmall?.copyWith(
|
// the empty-state below shows only a generic hint).
|
||||||
color: theme.colorScheme.onSurfaceVariant,
|
if (live)
|
||||||
|
Text(
|
||||||
|
l.auditLiveStatus(eventCount),
|
||||||
|
style: theme.textTheme.bodySmall?.copyWith(
|
||||||
|
color: theme.colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else
|
||||||
|
Flexible(
|
||||||
|
child: SelectableText(
|
||||||
|
l.auditDisconnected(error!),
|
||||||
|
maxLines: 2,
|
||||||
|
style: theme.textTheme.bodySmall?.copyWith(
|
||||||
|
color: theme.colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
if (live)
|
if (live)
|
||||||
Row(
|
Row(
|
||||||
|
|
|
||||||
|
|
@ -491,12 +491,8 @@ class _FaiSettingsDialogState extends State<ChainSettingsDialog> {
|
||||||
),
|
),
|
||||||
if (_error != null) ...[
|
if (_error != null) ...[
|
||||||
const SizedBox(height: ChainSpace.md),
|
const SizedBox(height: ChainSpace.md),
|
||||||
Text(
|
// Copyable — errors must be selectable + one-tap copyable.
|
||||||
_error!,
|
ChainErrorBox(text: _error!, isError: true, maxHeight: 200),
|
||||||
style: theme.textTheme.bodySmall?.copyWith(
|
|
||||||
color: theme.colorScheme.error,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
const SizedBox(height: ChainSpace.md),
|
const SizedBox(height: ChainSpace.md),
|
||||||
Container(
|
Container(
|
||||||
|
|
@ -2490,12 +2486,8 @@ class _DefaultScopePanelState extends State<_DefaultScopePanel> {
|
||||||
],
|
],
|
||||||
if (_error != null) ...[
|
if (_error != null) ...[
|
||||||
const SizedBox(height: ChainSpace.sm),
|
const SizedBox(height: ChainSpace.sm),
|
||||||
Text(
|
// Copyable — errors must be selectable + one-tap copyable.
|
||||||
_error!,
|
ChainErrorBox(text: _error!, isError: true, maxHeight: 200),
|
||||||
style: theme.textTheme.bodySmall?.copyWith(
|
|
||||||
color: theme.colorScheme.error,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue