fix(ui): point About and update links at the fork

The About page links the fork's website, source and issue tracker. The
Voca family tiles and Discord, X and mail links are gone. A single
Origin row credits upstream Vocalinux. The model-selection doc link and
the project URL now point at the fork host.
This commit is contained in:
2026-11-06 21:25:42 +05:30
parent 91708fdf4a
commit bc47ffecf6
5 changed files with 112 additions and 267 deletions
+1 -1
View File
@@ -131,5 +131,5 @@ def test_recommendation_does_not_change_picker_or_config_state(
def test_model_selection_docs_url_is_stable(settings_dialog: Any) -> None:
assert (
settings_dialog.MODEL_SELECTION_DOC_URL
== "https://github.com/VocaHQ/vocalinux/blob/main/docs/MODEL_SELECTION.md"
== "https://git.bongbetic.com/xavierk/voculinux/src/branch/main/docs/MODEL_SELECTION.md"
)
+61 -71
View File
@@ -1329,7 +1329,7 @@ class TestSettingsNavigation(unittest.TestCase):
class TestAboutPage(unittest.TestCase):
"""About page: this app, VocaHQ family, talk-to-us. Updater stays."""
"""About page: this app, talk-to-us, origin credit. Updater stays."""
@classmethod
def setUpClass(cls):
@@ -1343,7 +1343,7 @@ class TestAboutPage(unittest.TestCase):
def test_three_groups_keep_updater(self) -> None:
self.assertIn('title="Voculinux"', self.about)
self.assertIn('title="Part of VocaHQ"', self.about)
self.assertIn('title="Origin"', self.about)
self.assertIn('title="Talk to us"', self.about)
self.assertIn('title="Updates"', self.about)
self.assertIn("What's New", self.about)
@@ -1352,12 +1352,8 @@ class TestAboutPage(unittest.TestCase):
self.assertIn("self.update_checks_switch", self.about)
def test_product_status_and_honest_network_copy(self):
self.assertIn("Available now on Linux (X11 and Wayland)", self.about)
self.assertIn("Voice dictation for Linux (X11 and Wayland)", self.about)
self.assertIn("After a model is downloaded", self.about)
self.assertIn("Private dictation for Linux, Mac, Windows, and phone.", self.about)
self.assertIn("Android beta / iOS TestFlight", self.source)
self.assertIn("Windows, unsigned beta", self.source)
self.assertIn("Self-hosted, headless", self.source)
self.assertNotIn("iOS source build", self.source)
self.assertNotIn("SmartScreen", self.about)
self.assertNotIn("100% offline", self.about)
@@ -1367,28 +1363,44 @@ class TestAboutPage(unittest.TestCase):
# License is named once, on the License row, not in the intro or links.
self.assertEqual(self.about.count("GNU AGPL v3"), 1)
def test_family_and_talk_urls(self):
for url in (
"https://voculinux.com",
"https://vocahq.com",
"https://vocamac.com",
"https://vocawin.com",
"https://vocaphone.vocahq.com",
"https://vocagateway.vocahq.com",
"https://github.com/VocaHQ/vocalinux/issues",
"https://discord.gg/t6muquAJbm",
"https://x.com/vocahq",
"mailto:hello@vocahq.com",
):
self.assertIn(url, self.source)
def test_links_point_at_the_fork_and_one_credit(self):
from vocalinux.ui.settings_about import (
SOURCE_ISSUES_URL,
SOURCE_REPO_URL,
UPSTREAM_CREDIT_LINE,
UPSTREAM_REPO_URL,
VOCULINUX_SITE_URL,
)
self.assertEqual(VOCULINUX_SITE_URL, "https://voculinux.com")
self.assertEqual(SOURCE_REPO_URL, "https://git.bongbetic.com/xavierk/voculinux")
self.assertEqual(SOURCE_ISSUES_URL, f"{SOURCE_REPO_URL}/issues")
self.assertEqual(UPSTREAM_REPO_URL, "https://github.com/VocaHQ/vocalinux")
self.assertEqual(UPSTREAM_CREDIT_LINE.count(UPSTREAM_REPO_URL), 1)
self.assertIn('label="Report a bug or idea"', self.about)
self.assertIn("Join Discord", self.about)
self.assertIn("Follow on X", self.about)
self.assertIn("Email us", self.about)
self.assertIn("https://github.com/VocaHQ/vocalinux/issues", self.about)
self.assertIn("https://discord.gg/t6muquAJbm", self.source)
self.assertIn("https://x.com/vocahq", self.source)
self.assertIn("mailto:hello@vocahq.com", self.source)
self.assertIn("SOURCE_ISSUES_URL", self.about)
self.assertIn("UPSTREAM_CREDIT_LINE", self.about)
def test_family_and_social_links_are_gone(self):
"""Voca family sites and social channels are not Voculinux's to offer."""
for banned in (
"Part of VocaHQ",
"_VOCAHQ_FAMILY_LINKS",
"_family_tile",
"family_grid",
"Join Discord",
"Follow on X",
"Email us",
"discord.gg",
"x.com/",
"mailto:",
"vocahq.com",
"vocamac.com",
"vocawin.com",
"vocaphone.vocahq.com",
"vocagateway.vocahq.com",
):
self.assertNotIn(banned, self.source, banned)
def test_open_buttons_have_unique_accessible_names(self):
helper = self.source.split("def _about_open_button")[1].split("\n def ")[0]
@@ -1396,13 +1408,9 @@ class TestAboutPage(unittest.TestCase):
self.assertIn('if label == "Open"', helper)
for name in (
"Open voculinux.com website",
"Open vocahq.com",
"Open voculinux.com",
"Open vocamac.com",
"Open vocawin.com",
"Open vocaphone.vocahq.com",
"Open vocagateway.vocahq.com",
"Open the Voculinux GitHub repository",
"Open the Voculinux source repository",
"Open Voculinux issues for a bug or idea",
"Open the upstream project repository",
"Open the latest release page",
):
self.assertIn(name, self.source)
@@ -1412,12 +1420,13 @@ class TestAboutPage(unittest.TestCase):
self.assertIn("VOCULINUX_SITE_URL", self.about)
self.assertIn("Product site at voculinux.com", self.about)
self.assertNotIn("Open the Voculinux GitHub page", self.about)
self.assertNotIn("GitHub", self.about)
def test_source_code_row_sits_beside_website(self):
self.assertIn('label="Website"', self.about)
self.assertIn('label="Source code"', self.about)
self.assertIn("GITHUB_REPO_URL", self.about)
self.assertIn("Open the Voculinux GitHub repository", self.about)
self.assertIn("SOURCE_REPO_URL", self.about)
self.assertIn("Open the Voculinux source repository", self.about)
self.assertLess(self.about.find('label="Website"'), self.about.find('label="Source code"'))
def test_talk_to_us_sits_above_updates(self):
@@ -1434,52 +1443,34 @@ class TestAboutPage(unittest.TestCase):
self.assertNotIn('title="Latest Release"', self.about)
self.assertIn("self.latest_release_row = self.release_notes_row", self.about)
def test_family_uses_platform_icons(self):
self.assertIn("def _family_tile", self.source)
self.assertIn("platform-linux", self.source)
self.assertIn("platform-apple", self.source)
self.assertIn("platform-windows", self.source)
self.assertIn("platform-android", self.source)
self.assertIn("platform-server", self.source)
self.assertIn("platform-home", self.source)
self.assertIn('("platform-android", "platform-apple")', self.source)
self.assertIn("family_grid.attach", self.about)
self.assertIn("image.set_margin_end(8)", self.source)
helper = self.source.split("def _family_tile")[1].split("\n def ")[0]
self.assertIn("spacing=16", helper)
def test_origin_group_names_the_upstream_credit_once(self):
self.assertIn("origin_group = PreferencesGroup(", self.about)
self.assertIn("UPSTREAM_CREDIT_LINE", self.about)
self.assertIn("UPSTREAM_REPO_URL", self.about)
self.assertLess(
self.about.find('title="Updates"'),
self.about.find('title="Origin"'),
)
def test_can_open_about_urls(self):
from vocalinux.ui.settings_dialog import (
GITHUB_ISSUES_URL,
GITHUB_REPO_URL,
VOCAGATEWAY_SITE_URL,
VOCAHQ_DISCORD_URL,
VOCAHQ_MAILTO_URL,
VOCAHQ_SITE_URL,
VOCAHQ_X_URL,
VOCAMAC_SITE_URL,
VOCAPHONE_SITE_URL,
VOCAWIN_SITE_URL,
SOURCE_ISSUES_URL,
SOURCE_REPO_URL,
UPSTREAM_REPO_URL,
VOCULINUX_SITE_URL,
_can_open_url,
)
for url in (
VOCULINUX_SITE_URL,
VOCAHQ_SITE_URL,
VOCAMAC_SITE_URL,
VOCAWIN_SITE_URL,
VOCAPHONE_SITE_URL,
VOCAGATEWAY_SITE_URL,
GITHUB_REPO_URL,
GITHUB_ISSUES_URL,
VOCAHQ_DISCORD_URL,
VOCAHQ_X_URL,
VOCAHQ_MAILTO_URL,
SOURCE_REPO_URL,
SOURCE_ISSUES_URL,
UPSTREAM_REPO_URL,
"https://git.bongbetic.com/xavierk/voculinux/releases/tag/v0.15.0",
):
self.assertTrue(_can_open_url(url), url)
self.assertFalse(_can_open_url("https://github.com/VocaHQ/vocalinux/releases/tag/v0.15.0"))
self.assertFalse(_can_open_url("https://vocahq.com"))
self.assertFalse(_can_open_url("https://evil.example/payload"))
self.assertFalse(_can_open_url("mailto:evil@example.com"))
self.assertFalse(_can_open_url(""))
@@ -1594,7 +1585,6 @@ class TestAboutPage(unittest.TestCase):
self.assertIn("def _about_ink_hex(", self.source)
self.assertIn("def _about_surface_is_dark(", self.source)
self.assertIn('replace("currentColor", ink)', self.source)
self.assertIn("_FAMILY_ICON_PX", self.source)
class TestUpdatePreferences(unittest.TestCase):