Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to bbcom are documented here. The format is based on

## [Unreleased]

## [1.2.1] - 2026-09-12

### Added

- Serial sessions support updating connection settings while connected.

### Fixed

- Bundle JetBrains Mono Regular and Bold for consistent offline terminal fonts.
- Wait for terminal fonts before measuring character cells and replaying output;
use system monospace on font load failure and skip setup after unmounting.
- Adjust Shell font sizing and line spacing and disable ligatures and kerning
to keep serial output aligned.

## [1.2.0] - 2026-09-08

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
document, fall back to the read-only v1 app-settings blob. main.ts mounts
into #app and replaces the skeleton, so there is no layout shift.
-->
<link rel="preconnect" href="https://rsms.me" crossorigin />
<link
rel="preload"
href="/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<script>
(function () {
try {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bbcom",
"private": true,
"version": "1.2.0",
"version": "1.2.1",
"type": "module",
"packageManager": "pnpm@11.11.0",
"engines": {
Expand Down
Binary file not shown.
Binary file not shown.
93 changes: 93 additions & 0 deletions public/fonts/jetbrains-mono/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
11 changes: 11 additions & 0 deletions public/fonts/jetbrains-mono/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# JetBrains Mono

Unmodified Regular (400) and Bold (700) WOFF2 files from
[JetBrains Mono v2.304](https://github.com/JetBrains/JetBrainsMono/releases/tag/v2.304),
distributed under the [SIL Open Font License 1.1](OFL.txt).

These files ship with the application so terminal and data fonts work offline
without requiring a system font installation. The Shell waits for both weights
before xterm.js measures its character cells. Programming ligatures are disabled
in the terminal so serial output retains separate, aligned symbols. Chinese
glyphs use the platform's fallback fonts.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bbcom"
version = "1.2.0"
version = "1.2.1"
description = "Serial Port Assistant"
edition = "2024"
rust-version = "1.97"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2.0.0",
"productName": "bbcom",
"version": "1.2.0",
"version": "1.2.1",
"identifier": "com.bbcom.app",
"build": {
"beforeDevCommand": "pnpm run tauri:before-dev",
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { settingsService } from '@/features/settings';
import { bootstrapApplication } from './bootstrap-application';
import '@/design-system/fonts.css';
import '@/design-system/tokens/index.css';
import '@/styles/global.css';
import '@/styles/packet-columns.css';
Expand Down
2 changes: 2 additions & 0 deletions src/design-system/SignalToggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<n-switch
:value="modelValue"
size="small"
:disabled="disabled"
:aria-label="label"
@update:value="emit('update:modelValue', $event)"
/>
Expand All @@ -21,6 +22,7 @@ import { NSwitch } from 'naive-ui';
defineProps<{
label: string;
modelValue: boolean;
disabled?: boolean;
}>();

const emit = defineEmits<{
Expand Down
16 changes: 16 additions & 0 deletions src/design-system/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Bundled JetBrains Mono v2.304; license: public/fonts/jetbrains-mono/OFL.txt. */
@font-face {
font-family: 'JetBrains Mono';
src: url('/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2') format('woff2');
font-style: normal;
font-weight: 400;
font-display: swap;
}

@font-face {
font-family: 'JetBrains Mono';
src: url('/fonts/jetbrains-mono/JetBrainsMono-Bold.woff2') format('woff2');
font-style: normal;
font-weight: 700;
font-display: swap;
}
1 change: 1 addition & 0 deletions src/design-system/tokens/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
--font-family:
Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-sans: var(--font-family);
/* Primary face is bundled in fonts.css; missing glyphs use system fallback. */
--font-mono: 'JetBrains Mono', 'SFMono-Regular', 'Cascadia Mono', 'Menlo', 'Consolas', monospace;

/* Metadata may use 11px; body and controls start at 12px. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2188,8 +2188,9 @@ test('CreateSessionDialog syncs selected port/config, creates sessions, and save
// Re-query before each interaction: under the Teleport stub the modal body
// re-mounts per parent render, so element handles captured earlier go
// stale. Production teleports patch in place; only the stub remounts.
await wrapper.findAll('select')[2].setValue('3');
await wrapper.findAll('select')[5].setValue('2');
wrapper.findAllComponents(AppSelect)[2].vm.$emit('update:value', 57600);
wrapper.findAllComponents(AppSelect)[5].vm.$emit('update:value', 'even');
await wrapper.vm.$nextTick();
await wrapper.findAll('.modal-positive')[0].trigger('click');
expect(sessionActions.createSession).toHaveBeenCalledWith(
'COM-B',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ class FakePort implements SerialPortAdapter {
breakActive = false;
readonly controlEvents: string[] = [];
readonly clearBufferCalls: string[] = [];
readonly reconfigureCalls: Array<{
config: PortConfig;
previous?: Readonly<PortConfig>;
}> = [];
reconfigureImpl: (config: PortConfig) => Promise<void> = async () => undefined;
pendingRxBytes = 7;
pendingTxBytes = 3;
inputLines = { cts: true, dsr: false, ri: true, cd: false };
Expand All @@ -63,6 +68,10 @@ class FakePort implements SerialPortAdapter {
this.writes.push(data.slice());
return this.writeImpl(data);
}
async reconfigure(config: PortConfig, previous?: Readonly<PortConfig>): Promise<void> {
this.reconfigureCalls.push({ config: { ...config }, previous });
await this.reconfigureImpl(config);
}
async writeDataTerminalReady(value: boolean): Promise<void> {
await this.dtrImpl(value);
this.dtr = value;
Expand Down Expand Up @@ -152,6 +161,48 @@ function harness(
}

describe('SerialConnectionController (framework-free)', () => {
test('reconfigures an open port under an exclusive serial transaction', async () => {
const fake = new FakePort();
const { controller } = harness(fake);
const nextConfig: PortConfig = {
...config,
baudRate: 921600,
dataBits: 7,
parity: 'even',
rxFrameGapMs: 12,
dtr: true,
};

await expect(controller.start()).resolves.toBe(true);
await expect(controller.reconfigure(nextConfig)).resolves.toBeUndefined();

expect(fake.reconfigureCalls).toEqual([{ config: nextConfig, previous: config }]);
expect(controller.serialTransactions.snapshot()).toMatchObject({
phase: 'idle',
manualWriteAllowed: true,
});
await controller.dispose();
});

test('rolls an open port back when a live reconfiguration fails partway', async () => {
const fake = new FakePort();
const { controller } = harness(fake);
const nextConfig: PortConfig = { ...config, baudRate: 4000000, parity: 'odd' };
fake.reconfigureImpl = async (requested) => {
if (requested.baudRate === nextConfig.baudRate) throw new Error('unsupported baud rate');
};

await controller.start();
await expect(controller.reconfigure(nextConfig)).rejects.toThrow('unsupported baud rate');

expect(fake.reconfigureCalls).toEqual([
{ config: nextConfig, previous: config },
{ config, previous: nextConfig },
]);
expect(controller.serialTransactions.snapshot().phase).toBe('idle');
await controller.dispose();
});

test('stop during final connection synchronization makes the pending start report cancellation', async () => {
const { controller } = harness(new FakePort());
const entered = deferred<void>();
Expand Down
Loading