Phrasing corrections

This commit is contained in:
Jack Kingsman
2026-04-17 08:56:16 -07:00
parent 71da6841c1
commit b1547773c5
9 changed files with 35 additions and 34 deletions
@@ -84,12 +84,12 @@ export function BulkAddChannelResultModal({
</div> </div>
</div> </div>
) : ( ) : (
<p className="text-sm text-muted-foreground">No new rooms were added.</p> <p className="text-sm text-muted-foreground">No new channels were added.</p>
)} )}
{result && result.invalid_names.length > 0 && ( {result && result.invalid_names.length > 0 && (
<div className="rounded-md border border-warning/30 bg-warning/10 px-3 py-2 text-sm text-warning"> <div className="rounded-md border border-warning/30 bg-warning/10 px-3 py-2 text-sm text-warning">
Ignored invalid room names: {result.invalid_names.join(', ')} Ignored invalid channel names: {result.invalid_names.join(', ')}
</div> </div>
)} )}
</div> </div>
+5 -6
View File
@@ -298,17 +298,16 @@ export function ContactInfoPane({
{isPrefixOnlyResolvedContact && ( {isPrefixOnlyResolvedContact && (
<div className="mx-5 mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive"> <div className="mx-5 mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive">
We only know a key prefix for this sender, which can happen when a fallback DM We&apos;ve received a message from this sender but don&apos;t have their full
arrives before we hear an advertisement. This contact stays read-only until the full identity yet. This contact stays read-only until their identity is confirmed &mdash;
key resolves from a later advertisement. this usually happens automatically when they next advertise.
</div> </div>
)} )}
{isUnknownFullKeyResolvedContact && ( {isUnknownFullKeyResolvedContact && (
<div className="mx-5 mt-4 rounded-md border border-warning/30 bg-warning/10 px-3 py-2 text-sm text-warning"> <div className="mx-5 mt-4 rounded-md border border-warning/30 bg-warning/10 px-3 py-2 text-sm text-warning">
We know this sender&apos;s full key, but we have not yet heard an advertisement that This sender&apos;s profile details (name, location) haven&apos;t arrived yet. They
fills in their identity details. Those details will appear automatically when an will fill in automatically when the sender&apos;s next advertisement is heard.
advertisement arrives.
</div> </div>
)} )}
+5 -5
View File
@@ -103,17 +103,17 @@ function ContactResolutionBanner({ variant }: { variant: 'unknown-full-key' | 'p
if (variant === 'prefix-only') { if (variant === 'prefix-only') {
return ( return (
<div className="mx-4 mt-3 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive"> <div className="mx-4 mt-3 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive">
We only know a key prefix for this sender, which can happen when a fallback DM arrives We&apos;ve received a message from this sender but don&apos;t have their full identity yet.
before we learn their full identity. This conversation is read-only until we hear an Sending is disabled until their identity is confirmed &mdash; this usually happens
advertisement that resolves the full key. automatically when they next advertise.
</div> </div>
); );
} }
return ( return (
<div className="mx-4 mt-3 rounded-md border border-warning/30 bg-warning/10 px-3 py-2 text-sm text-warning"> <div className="mx-4 mt-3 rounded-md border border-warning/30 bg-warning/10 px-3 py-2 text-sm text-warning">
A full identity profile is not yet available because we have not heard an advertisement from This sender&apos;s profile details (name, location) haven&apos;t arrived yet. They will fill
this sender. The contact will fill in automatically when an advertisement arrives. in automatically when the sender&apos;s next advert is heard.
</div> </div>
); );
} }
+5 -5
View File
@@ -183,11 +183,11 @@ export function NewMessageModal({
permitCapitals permitCapitals
); );
if (channelNames.length === 0) { if (channelNames.length === 0) {
setError('Enter at least one valid room name'); setError('Enter at least one valid channel name');
return; return;
} }
if (invalidNames.length > 0) { if (invalidNames.length > 0) {
setError(`Invalid room names: ${invalidNames.join(', ')}`); setError(`Invalid channel names: ${invalidNames.join(', ')}`);
return; return;
} }
await onBulkAddHashtagChannels(channelNames, tryHistorical); await onBulkAddHashtagChannels(channelNames, tryHistorical);
@@ -249,7 +249,7 @@ export function NewMessageModal({
{tab === 'new-contact' && 'Add a new contact by entering their name and public key'} {tab === 'new-contact' && 'Add a new contact by entering their name and public key'}
{tab === 'new-channel' && 'Create a private channel with a shared encryption key'} {tab === 'new-channel' && 'Create a private channel with a shared encryption key'}
{tab === 'hashtag' && 'Join a public hashtag channel'} {tab === 'hashtag' && 'Join a public hashtag channel'}
{tab === 'bulk-hashtag' && 'Paste multiple hashtag rooms to add them in one batch'} {tab === 'bulk-hashtag' && 'Paste multiple hashtag channels to add them in one batch'}
</DialogDescription> </DialogDescription>
</DialogHeader> </DialogHeader>
@@ -377,11 +377,11 @@ export function NewMessageModal({
aria-label="Bulk channel names" aria-label="Bulk channel names"
value={bulkChannelText} value={bulkChannelText}
onChange={(e) => setBulkChannelText(e.target.value)} onChange={(e) => setBulkChannelText(e.target.value)}
placeholder={'#ops\nmesh-room\nanother-room'} placeholder={'#ops\nmesh-chat\nanother-channel'}
className="min-h-48 w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm outline-none transition-colors placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring" className="min-h-48 w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm outline-none transition-colors placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring"
/> />
<p className="text-xs text-muted-foreground"> <p className="text-xs text-muted-foreground">
Paste room names separated by lines, spaces, or commas. Leading # marks are Paste channel names separated by lines, spaces, or commas. Leading # marks are
stripped automatically. stripped automatically.
</p> </p>
</div> </div>
@@ -668,10 +668,10 @@ export function SettingsRadioSection({
variant="outline" variant="outline"
className="flex-1" className="flex-1"
> >
{busy && !rebooting ? 'Saving...' : 'Save'} {busy && !rebooting ? 'Saving...' : 'Save Radio Config'}
</Button> </Button>
<Button onClick={handleSaveAndReboot} disabled={busy || rebooting} className="flex-1"> <Button onClick={handleSaveAndReboot} disabled={busy || rebooting} className="flex-1">
{rebooting ? 'Rebooting...' : 'Save & Reboot'} {rebooting ? 'Rebooting...' : 'Save Radio Config & Reboot'}
</Button> </Button>
</div> </div>
<p className="text-[0.8125rem] text-muted-foreground"> <p className="text-[0.8125rem] text-muted-foreground">
@@ -769,7 +769,7 @@ export function SettingsRadioSection({
)} )}
<Button onClick={handleSaveFloodSettings} disabled={floodBusy} className="w-full"> <Button onClick={handleSaveFloodSettings} disabled={floodBusy} className="w-full">
{floodBusy ? 'Saving...' : 'Save Settings'} {floodBusy ? 'Saving...' : 'Save Messaging Settings'}
</Button> </Button>
<Separator /> <Separator />
@@ -43,6 +43,6 @@ describe('BulkAddChannelResultModal', () => {
expect(opsLink.getAttribute('href')).toContain('#channel/'); expect(opsLink.getAttribute('href')).toContain('#channel/');
expect(meshLink.getAttribute('href')).toContain('#channel/'); expect(meshLink.getAttribute('href')).toContain('#channel/');
expect(screen.queryByRole('link', { name: /bad_room/i })).toBeNull(); expect(screen.queryByRole('link', { name: /bad_room/i })).toBeNull();
expect(screen.getByText(/Ignored invalid room names: bad_room/)).toBeTruthy(); expect(screen.getByText(/Ignored invalid channel names: bad_room/)).toBeTruthy();
}); });
}); });
+4 -2
View File
@@ -379,7 +379,7 @@ describe('ConversationPane', () => {
/> />
); );
expect(screen.getByText(/A full identity profile is not yet available/i)).toBeInTheDocument(); expect(screen.getByText(/profile details.*haven't arrived yet/i)).toBeInTheDocument();
expect(screen.getByTestId('message-input')).toBeInTheDocument(); expect(screen.getByTestId('message-input')).toBeInTheDocument();
}); });
@@ -416,7 +416,9 @@ describe('ConversationPane', () => {
/> />
); );
expect(screen.getByText(/This conversation is read-only/i)).toBeInTheDocument(); expect(
screen.getByText(/Sending is disabled until their identity is confirmed/i)
).toBeInTheDocument();
expect(screen.queryByTestId('message-input')).not.toBeInTheDocument(); expect(screen.queryByTestId('message-input')).not.toBeInTheDocument();
}); });
}); });
+3 -3
View File
@@ -119,7 +119,7 @@ describe('NewMessageModal form reset', () => {
expect(screen.queryByRole('tab', { name: 'Bulk Add Channel' })).toBeNull(); expect(screen.queryByRole('tab', { name: 'Bulk Add Channel' })).toBeNull();
}); });
it('opens on the bulk tab when enabled and submits normalized room names', async () => { it('opens on the bulk tab when enabled and submits normalized channel names', async () => {
const user = userEvent.setup(); const user = userEvent.setup();
renderModal(true, { showBulkAddChannelTab: true }); renderModal(true, { showBulkAddChannelTab: true });
@@ -145,7 +145,7 @@ describe('NewMessageModal form reset', () => {
expect(onClose).toHaveBeenCalled(); expect(onClose).toHaveBeenCalled();
}); });
it('shows invalid bulk room names before submitting', async () => { it('shows invalid bulk channel names before submitting', async () => {
const user = userEvent.setup(); const user = userEvent.setup();
renderModal(true, { showBulkAddChannelTab: true }); renderModal(true, { showBulkAddChannelTab: true });
@@ -156,7 +156,7 @@ describe('NewMessageModal form reset', () => {
await user.click(screen.getByRole('button', { name: 'Add Channels' })); await user.click(screen.getByRole('button', { name: 'Add Channels' }));
expect(onBulkAddHashtagChannels).not.toHaveBeenCalled(); expect(onBulkAddHashtagChannels).not.toHaveBeenCalled();
expect(screen.getByText('Invalid room names: bad_room')).toBeTruthy(); expect(screen.getByText('Invalid channel names: bad_room')).toBeTruthy();
}); });
}); });
+7 -7
View File
@@ -334,7 +334,7 @@ describe('SettingsModal', () => {
fireEvent.change(screen.getByLabelText('Advert Location Source'), { fireEvent.change(screen.getByLabelText('Advert Location Source'), {
target: { value: 'off' }, target: { value: 'off' },
}); });
fireEvent.click(screen.getByRole('button', { name: 'Save' })); fireEvent.click(screen.getByRole('button', { name: 'Save Radio Config' }));
await waitFor(() => { await waitFor(() => {
expect(onSave).toHaveBeenCalledWith( expect(onSave).toHaveBeenCalledWith(
@@ -348,7 +348,7 @@ describe('SettingsModal', () => {
openRadioSection(); openRadioSection();
fireEvent.click(screen.getByLabelText('Extra Direct ACK Transmission')); fireEvent.click(screen.getByLabelText('Extra Direct ACK Transmission'));
fireEvent.click(screen.getByRole('button', { name: 'Save' })); fireEvent.click(screen.getByRole('button', { name: 'Save Radio Config' }));
await waitFor(() => { await waitFor(() => {
expect(onSave).toHaveBeenCalledWith(expect.objectContaining({ multi_acks_enabled: true })); expect(onSave).toHaveBeenCalledWith(expect.objectContaining({ multi_acks_enabled: true }));
@@ -362,8 +362,8 @@ describe('SettingsModal', () => {
const maxContactsInput = screen.getByLabelText('Max Contacts on Radio'); const maxContactsInput = screen.getByLabelText('Max Contacts on Radio');
fireEvent.change(maxContactsInput, { target: { value: '250' } }); fireEvent.change(maxContactsInput, { target: { value: '250' } });
// Click the "Save Settings" button in the Flood & Advert Control section // Click the "Save Messaging Settings" button
const saveButtons = screen.getAllByRole('button', { name: 'Save Settings' }); const saveButtons = screen.getAllByRole('button', { name: 'Save Messaging Settings' });
fireEvent.click(saveButtons[0]); fireEvent.click(saveButtons[0]);
await waitFor(() => { await waitFor(() => {
@@ -377,8 +377,8 @@ describe('SettingsModal', () => {
}); });
openRadioSection(); openRadioSection();
// Click the "Save Settings" button in the Flood & Advert Control section // Click the "Save Messaging Settings" button
const saveButtons = screen.getAllByRole('button', { name: 'Save Settings' }); const saveButtons = screen.getAllByRole('button', { name: 'Save Messaging Settings' });
fireEvent.click(saveButtons[0]); fireEvent.click(saveButtons[0]);
await waitFor(() => { await waitFor(() => {
@@ -542,7 +542,7 @@ describe('SettingsModal', () => {
}); });
openRadioSection(); openRadioSection();
fireEvent.click(screen.getByRole('button', { name: 'Save & Reboot' })); fireEvent.click(screen.getByRole('button', { name: 'Save Radio Config & Reboot' }));
await waitFor(() => { await waitFor(() => {
expect(onSave).toHaveBeenCalledTimes(1); expect(onSave).toHaveBeenCalledTimes(1);
expect(onReboot).toHaveBeenCalledTimes(1); expect(onReboot).toHaveBeenCalledTimes(1);