From 14b3074ad0f1b510276b688ac15d996474ad1755 Mon Sep 17 00:00:00 2001
From: TripleU <182648541+TripleU613@users.noreply.github.com>
Date: Fri, 4 Dec 2026 13:06:11 -0500
Subject: [PATCH 1/3] Apply Dependabot security and dependency updates and fix
upstream Discourse CI breakages
Combines all 10 open Dependabot PRs (#456-#464, #467), including the rack 3.2.9 security fix, and resolves the lint and system-test failures blocking them:
- Rebuild themes/jtech/assets/icons-sprite.svg for lucide-static 1.83.0.
- Pass open_timeout/read_timeout to Net::HTTP.start in TelegramApi and rename the background let in jtech_theme_part4_spec.rb for rubocop-discourse 4.1.0.
- Switch SiteSetting.allow_user_locale to SiteSetting.allowed_user_locales = 'all' after Discourse #46653.
- Reorder the new aria-live wrapper around .result-count in jt-search.scss after Discourse #47061.
- Match button heights in .user-card .usercard-controls after Discourse #47261 made core buttons icon-only.
- Wait for .user-menu to settle and retry detached notification clicks in Playwright system specs.
---
Gemfile.lock | 29 ++--
lib/discourse_disteleplus/telegram_api.rb | 22 ++-
package.json | 16 +-
pnpm-lock.yaml | 159 ++++++++++--------
spec/system/feature_screenshots_spec.rb | 10 +-
spec/system/jtech_theme_part2_spec.rb | 2 +-
spec/system/jtech_theme_part3_spec.rb | 2 +-
spec/system/jtech_theme_part4_spec.rb | 22 ++-
spec/system/reqpm_spec.rb | 14 +-
.../system/review_queue_click_through_spec.rb | 12 +-
themes/jtech/assets/icons-sprite.svg | 4 +-
themes/jtech/stylesheets/jt-panels.scss | 10 +-
themes/jtech/stylesheets/jt-search.scss | 4 +
13 files changed, 183 insertions(+), 123 deletions(-)
diff --git a/Gemfile.lock b/Gemfile.lock
index fdf0f07a..8fa393b2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -18,11 +18,11 @@ GEM
base64 (0.3.0)
bigdecimal (4.1.3)
concurrent-ruby (1.3.8)
- connection_pool (3.0.2)
+ connection_pool (3.0.3)
drb (2.2.3)
i18n (1.15.2)
concurrent-ruby (~> 1.0)
- json (3.1.0)
+ json (3.2.0)
language_server-protocol (3.17.0.6)
lint_roller (1.1.0)
logger (1.7.0)
@@ -30,16 +30,16 @@ GEM
drb (~> 2.0)
prism (>= 1.5, < 3)
parallel (2.3.0)
- parser (3.3.13.0)
+ parser (3.3.14.0)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
- prism (1.9.0)
+ prism (2.1.0)
racc (1.8.1)
- rack (3.2.8)
+ rack (3.2.9)
rainbow (3.1.1)
- regexp_parser (2.13.1)
- rubocop (1.92.2)
+ regexp_parser (2.13.4)
+ rubocop (1.93.0)
json (>= 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
@@ -47,16 +47,18 @@ GEM
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.11.3, < 3.0)
- rubocop-ast (>= 1.49.0, < 2.0)
+ rubocop-ast (>= 1.54.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
- rubocop-ast (1.50.0)
+ rubocop-ast (1.54.0)
+ ast (~> 2.4)
parser (>= 3.3.7.2)
- prism (~> 1.7)
+ prism (>= 1.7)
+ racc
rubocop-capybara (3.1.0)
lint_roller (~> 1.1)
rubocop (~> 1.89)
- rubocop-discourse (4.0.0)
+ rubocop-discourse (4.1.0)
activesupport (>= 6.1)
lint_roller (>= 1.1.0)
rubocop (>= 1.82.0)
@@ -77,10 +79,9 @@ GEM
rack (>= 1.1)
rubocop (>= 1.89.0, < 2.0)
rubocop-ast (>= 1.44.0, < 2.0)
- rubocop-rspec (3.10.2)
+ rubocop-rspec (3.11.0)
lint_roller (~> 1.1)
- regexp_parser (>= 2.0)
- rubocop (~> 1.86, >= 1.86.2)
+ rubocop (~> 1.92)
rubocop-rspec_rails (2.33.0)
lint_roller (~> 1.1)
rubocop (~> 1.89)
diff --git a/lib/discourse_disteleplus/telegram_api.rb b/lib/discourse_disteleplus/telegram_api.rb
index 59121aad..045015cb 100644
--- a/lib/discourse_disteleplus/telegram_api.rb
+++ b/lib/discourse_disteleplus/telegram_api.rb
@@ -71,9 +71,13 @@ def download_file(file_id, max_bytes:)
uri = URI("#{BASE}/file/bot#{@token}/#{file_path}")
tempfile = Tempfile.new(["disteleplus", File.extname(file_path)], binmode: true)
- Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
- http.open_timeout = OPEN_TIMEOUT
- http.read_timeout = READ_TIMEOUT
+ Net::HTTP.start(
+ uri.host,
+ uri.port,
+ use_ssl: true,
+ open_timeout: OPEN_TIMEOUT,
+ read_timeout: READ_TIMEOUT,
+ ) do |http|
http.request(Net::HTTP::Get.new(uri.request_uri)) do |response|
raise "unexpected #{response.code}" unless response.code.to_i == 200
response.read_body do |chunk|
@@ -96,11 +100,13 @@ def download_file(file_id, max_bytes:)
private
def perform(uri, request)
- Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
- http.open_timeout = OPEN_TIMEOUT
- http.read_timeout = READ_TIMEOUT
- http.request(request)
- end
+ Net::HTTP.start(
+ uri.host,
+ uri.port,
+ use_ssl: true,
+ open_timeout: OPEN_TIMEOUT,
+ read_timeout: READ_TIMEOUT,
+ ) { |http| http.request(request) }
end
def parse_response(response)
diff --git a/package.json b/package.json
index 6c3c5193..09821397 100644
--- a/package.json
+++ b/package.json
@@ -1,20 +1,20 @@
{
"private": true,
"devDependencies": {
- "@discourse/lint-configs": "3.9.1",
- "@glint/ember-tsc": "1.14.3",
- "@types/node": "^26.6.6",
- "concurrently": "^10.0.6",
+ "@discourse/lint-configs": "3.12.0",
+ "@glint/ember-tsc": "1.14.4",
+ "@types/node": "^26.6.11",
+ "concurrently": "^10.0.7",
"discourse": "npm:@discourse/types@2026.10.0-a5125163",
"esbuild": "0.28.2",
"eslint": "10.6.0",
"espree": "11.2.0",
"jiti": "^2.7.0",
- "lucide-static": "1.69.0",
- "playwright-core": "1.65.0",
- "postcss": "8.5.32",
+ "lucide-static": "1.83.0",
+ "playwright-core": "1.65.1",
+ "postcss": "8.5.34",
"prettier": "3.8.1",
- "sass": "1.107.1",
+ "sass": "1.108.2",
"sharp": "0.35.5",
"stylelint": "17.5.0",
"typescript": "5.9.3"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2c84bd06..1b43ade1 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -13,17 +13,17 @@ importers:
.:
devDependencies:
'@discourse/lint-configs':
- specifier: 3.9.1
- version: 3.9.1(eslint@10.6.0(jiti@2.7.0))(postcss@8.5.32)(prettier@3.8.1)(stylelint@17.5.0(typescript@5.9.3))
+ specifier: 3.12.0
+ version: 3.12.0(eslint@10.6.0(jiti@2.7.0))(postcss@8.5.34)(prettier@3.8.1)(stylelint@17.5.0(typescript@5.9.3))
'@glint/ember-tsc':
- specifier: 1.14.3
- version: 1.14.3(typescript@5.9.3)
+ specifier: 1.14.4
+ version: 1.14.4(typescript@5.9.3)
'@types/node':
- specifier: ^26.6.6
- version: 26.6.6
+ specifier: ^26.6.11
+ version: 26.6.11
concurrently:
- specifier: ^10.0.6
- version: 10.0.6
+ specifier: ^10.0.7
+ version: 10.1.0
discourse:
specifier: npm:@discourse/types@2026.10.0-a5125163
version: '@discourse/types@2026.10.0-a5125163'
@@ -40,23 +40,23 @@ importers:
specifier: ^2.7.0
version: 2.7.0
lucide-static:
- specifier: 1.69.0
- version: 1.69.0
+ specifier: 1.83.0
+ version: 1.83.0
playwright-core:
- specifier: 1.65.0
- version: 1.65.0
+ specifier: 1.65.1
+ version: 1.65.1
postcss:
- specifier: 8.5.32
- version: 8.5.32
+ specifier: 8.5.34
+ version: 8.5.34
prettier:
specifier: 3.8.1
version: 3.8.1
sass:
- specifier: 1.107.1
- version: 1.107.1
+ specifier: 1.108.2
+ version: 1.108.2
sharp:
specifier: 0.35.5
- version: 0.35.5(@types/node@26.6.6)
+ version: 0.35.5(@types/node@26.6.11)
stylelint:
specifier: 17.5.0
version: 17.5.0(typescript@5.9.3)
@@ -362,8 +362,8 @@ packages:
peerDependencies:
postcss-selector-parser: ^7.1.1
- '@discourse/lint-configs@3.9.1':
- resolution: {integrity: sha512-8AKysdyxJnNoSSFKKLk0k6q+cX/M9AUNAad5bTfMGcyaAiVO+fy94Kf9z3nexPUmy4ALWEuaTdEp4aW+Xfsjmw==}
+ '@discourse/lint-configs@3.12.0':
+ resolution: {integrity: sha512-8PT9EVI8v0CLJyb4zapZjesNwUogf1U7XlDnPQu0N+l1fcrtSqq55TMQHC6iOyyC0keGAkJ5RL8gfbTZZmFNbw==}
peerDependencies:
eslint: 10.6.0
prettier: 3.8.1
@@ -595,8 +595,8 @@ packages:
'@glimmer/syntax@0.97.0':
resolution: {integrity: sha512-uDUqlAxU40eJHJjMUR6ffdpDp6W53gNvS9YZNrBbf77sUL5xUFsBAaReB3FuyVPbwRg09p5rviioUJ8nyg7BBA==}
- '@glint/ember-tsc@1.14.3':
- resolution: {integrity: sha512-/NHLni6c5o1KsV6l+P6k0qzmijJmVCs3qZ+4Slrxx2ps8/T7NWIB2PUNvCV27A3JcPcLd/Jr5x5LeysoW3YPTA==}
+ '@glint/ember-tsc@1.14.4':
+ resolution: {integrity: sha512-yWWMiu5aGcSrXodSjnrM38RY8Kph5gPSUb9oauczoE7VkcD4duVlamGU47xuKBIUUtNQjUVA9zRnSKF4CTMgbA==}
hasBin: true
peerDependencies:
ember-source: '>=3.28.0'
@@ -1053,8 +1053,8 @@ packages:
'@types/json-schema@7.0.15':
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
- '@types/node@26.6.6':
- resolution: {integrity: sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==}
+ '@types/node@26.6.11':
+ resolution: {integrity: sha512-uUyQ2XLEz+EXh34lmS3GhKrkqn/8FU7KUiKRpk347At2bmnMVWss45yz8b4FG/tUtmV1tV/+TVkITItPROyeeQ==}
'@typescript-eslint/eslint-plugin@8.72.1':
resolution: {integrity: sha512-5CokTWXpmbylfFabsbvHC0CAw3XLaGnoa+nFJX5FR592h/LoZsENUE6p/rg5xvkKrFEXz6pYmgI29AgXc2N3BQ==}
@@ -1275,9 +1275,9 @@ packages:
caniuse-lite@1.0.30001820:
resolution: {integrity: sha512-gfWD6MxqVCqAOwmODfZf7DchWvlrA+SRdNX7ceLfg3xRqe5ssjjpF7EgslC/0tiLiNTajdaNN/q8c/5u/7Gz8w==}
- chalk@5.6.2:
- resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==}
- engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
+ chalk@6.0.1:
+ resolution: {integrity: sha512-/Ce6KNm3vIbWdMlNna6RVIZ/ICQxnJxCicet5LBKK9ZffBkqzDw0xh9EiKSljdRtiIQ1S1z4YgcscUUGzNCWrA==}
+ engines: {node: '>=22'}
chokidar@5.0.0:
resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==}
@@ -1301,8 +1301,8 @@ packages:
resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==}
engines: {node: '>=20'}
- concurrently@10.0.6:
- resolution: {integrity: sha512-qgICXXFp2/3nAebRLmxcINKEXM1mLK3ij/y31P02VTs/KIkddIeC05n73DxOXsXMB9LFSqNU1/na3lDlOhcbIw==}
+ concurrently@10.1.0:
+ resolution: {integrity: sha512-Zg+cmqvXKtvYnrticZHTusSBbkerXjBJUjvta/ujFIskBX3luCQrKIX/yTuFC42XS/6x6Voe/NeAjwsfrdFz0g==}
engines: {node: '>=22'}
hasBin: true
@@ -1811,8 +1811,8 @@ packages:
lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
- lucide-static@1.69.0:
- resolution: {integrity: sha512-n51UItv/qDzvu/UQixn0eSkp3hXppIJg0sRvtltb+rEO0XH2tyqFmtLsaUWu3SiAD0/7NHj/LH0eJlJJL5F4Ew==}
+ lucide-static@1.83.0:
+ resolution: {integrity: sha512-GOJktV2eBckh8MAHAOajiW+DErsADmQrGHNoyT57Un6F/Xrq2MP3IwIhgIUHaekyCtKNawJjSCXMI5ND3yRxbQ==}
mathml-tag-names@4.0.0:
resolution: {integrity: sha512-aa6AU2Pcx0VP/XWnh8IGL0SYSgQHDT6Ucror2j2mXeFAlN3ahaNs8EZtG1YiticMkSLj3Gt6VPFfZogt7G5iFQ==}
@@ -1917,8 +1917,8 @@ packages:
resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==}
engines: {node: '>=12'}
- playwright-core@1.65.0:
- resolution: {integrity: sha512-vNSKgH6YqtN7cdT/L334zo0a+YwkrpicyrHJlWWPIm/Q+Nn2SWInil01oT0mbu96U4GgoRtCYQD9CzJQgju+lA==}
+ playwright-core@1.65.1:
+ resolution: {integrity: sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==}
engines: {node: '>=20'}
hasBin: true
@@ -1951,8 +1951,8 @@ packages:
postcss-value-parser@4.2.0:
resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==}
- postcss@8.5.32:
- resolution: {integrity: sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==}
+ postcss@8.5.34:
+ resolution: {integrity: sha512-P1Qzj0XXZjMda74C7qiVnBG90UKNbyNUAOeQRBW8X63RsIMV57gevRqjnkELdwtZ/S2/uQFksJhmwuN8xShLPw==}
engines: {node: ^10 || ^12 || >=14}
prelude-ls@1.2.1:
@@ -2015,8 +2015,8 @@ packages:
rxjs@7.8.2:
resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==}
- sass@1.107.1:
- resolution: {integrity: sha512-aJ1/LvxOOb04YhmiBjzZn3jVwdHKol+OVhoMV6fFl02fF9T3i+5Mg9l/CnzqtM+NX5Jn5o3lAbs/ZJivTCLHfQ==}
+ sass@1.108.2:
+ resolution: {integrity: sha512-kugK8djotnG9HQRPTOf36asKYlxg8rWWsNLYHOgWDIVOiZQqlRfKBgF4XXM6kfw146kIDMvm57B4GIkvDSyTzA==}
engines: {node: '>=20.19.0'}
hasBin: true
@@ -2076,6 +2076,10 @@ packages:
resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==}
engines: {node: '>=0.10.0'}
+ source-map-js@1.3.0:
+ resolution: {integrity: sha512-pdUVfIWcK0kCgK831ibqkZDcL7I9zljjOu0TQFnA+fiQ6y1CYqYB7RkTOHHO45FGMg5P/Mvk/+4ToQ7gAYAL5Q==}
+ engines: {node: '>=6.0.0'}
+
string-width@4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
@@ -2143,6 +2147,10 @@ packages:
resolution: {integrity: sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==}
engines: {node: '>=18'}
+ supports-color@11.0.0:
+ resolution: {integrity: sha512-/zyImLdxhdygBIaVX0xTlQhKaCDLCrm665aqHk8xqK/Pa6k61fL6gwQGQq1k31yNyz6x55PppQgF2DMyPQa5xw==}
+ engines: {node: '>=22'}
+
supports-hyperlinks@4.4.0:
resolution: {integrity: sha512-UKbpT93hN5Nr9go5UY7bopIB9YQlMz9nm/ct4IXt/irb5YRkn9WaqrOBJGZ5Pwvsd5FQzSVeYlGdXoCAPQZrPg==}
engines: {node: '>=20'}
@@ -2311,8 +2319,8 @@ packages:
resolution: {integrity: sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==}
engines: {node: ^20.19.0 || ^22.12.0 || >=23}
- yargs@18.0.0:
- resolution: {integrity: sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==}
+ yargs@18.2.0:
+ resolution: {integrity: sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==}
engines: {node: ^20.19.0 || ^22.12.0 || >=23}
yocto-queue@0.1.0:
@@ -2677,7 +2685,7 @@ snapshots:
dependencies:
postcss-selector-parser: 7.1.6
- '@discourse/lint-configs@3.9.1(eslint@10.6.0(jiti@2.7.0))(postcss@8.5.32)(prettier@3.8.1)(stylelint@17.5.0(typescript@5.9.3))':
+ '@discourse/lint-configs@3.12.0(eslint@10.6.0(jiti@2.7.0))(postcss@8.5.34)(prettier@3.8.1)(stylelint@17.5.0(typescript@5.9.3))':
dependencies:
'@babel/core': 8.0.10
'@babel/eslint-parser': 8.0.7(@babel/core@8.0.10)(eslint@10.6.0(jiti@2.7.0))
@@ -2696,7 +2704,7 @@ snapshots:
prettier-plugin-ember-template-tag: 2.1.8(prettier@3.8.1)
stylelint: 17.5.0(typescript@5.9.3)
stylelint-config-standard: 40.0.0(stylelint@17.5.0(typescript@5.9.3))
- stylelint-config-standard-scss: 17.0.0(postcss@8.5.32)(stylelint@17.5.0(typescript@5.9.3))
+ stylelint-config-standard-scss: 17.0.0(postcss@8.5.34)(stylelint@17.5.0(typescript@5.9.3))
stylelint-scss: 7.4.0(stylelint@17.5.0(typescript@5.9.3))
typescript: 5.9.3
typescript-eslint: 8.72.1(eslint@10.6.0(jiti@2.7.0))(typescript@5.9.3)
@@ -2852,7 +2860,7 @@ snapshots:
dependencies:
simple-html-tokenizer: 1.0.0
- '@glint/ember-tsc@1.14.3(typescript@5.9.3)':
+ '@glint/ember-tsc@1.14.4(typescript@5.9.3)':
dependencies:
'@glimmer/syntax': 0.97.0
'@glint/template': 1.11.1
@@ -3203,7 +3211,7 @@ snapshots:
'@types/json-schema@7.0.15': {}
- '@types/node@26.6.6':
+ '@types/node@26.6.11':
dependencies:
undici-types: 8.9.0
@@ -3484,7 +3492,7 @@ snapshots:
caniuse-lite@1.0.30001820: {}
- chalk@5.6.2: {}
+ chalk@6.0.1: {}
chokidar@5.0.0:
dependencies:
@@ -3506,14 +3514,14 @@ snapshots:
commander@14.0.3: {}
- concurrently@10.0.6:
+ concurrently@10.1.0:
dependencies:
- chalk: 5.6.2
+ chalk: 6.0.1
rxjs: 7.8.2
shell-quote: 1.12.0
- supports-color: 10.2.2
+ supports-color: 11.0.0
tree-kill: 1.2.2
- yargs: 18.0.0
+ yargs: 18.2.0
content-tag@4.2.1: {}
@@ -3558,7 +3566,7 @@ snapshots:
dot-case@3.0.4:
dependencies:
no-case: 3.0.4
- tslib: 2.8.1
+ tslib: 2.9.1
editorconfig@3.0.2:
dependencies:
@@ -4010,7 +4018,7 @@ snapshots:
dependencies:
yallist: 3.1.1
- lucide-static@1.69.0: {}
+ lucide-static@1.83.0: {}
mathml-tag-names@4.0.0: {}
@@ -4041,7 +4049,7 @@ snapshots:
no-case@3.0.4:
dependencies:
lower-case: 2.0.2
- tslib: 2.8.1
+ tslib: 2.9.1
node-addon-api@7.1.1:
optional: true
@@ -4119,19 +4127,19 @@ snapshots:
picomatch@4.0.7: {}
- playwright-core@1.65.0: {}
+ playwright-core@1.65.1: {}
postcss-media-query-parser@0.2.3: {}
postcss-resolve-nested-selector@0.1.7: {}
- postcss-safe-parser@7.0.1(postcss@8.5.32):
+ postcss-safe-parser@7.0.1(postcss@8.5.34):
dependencies:
- postcss: 8.5.32
+ postcss: 8.5.34
- postcss-scss@4.0.9(postcss@8.5.32):
+ postcss-scss@4.0.9(postcss@8.5.34):
dependencies:
- postcss: 8.5.32
+ postcss: 8.5.34
postcss-selector-parser@7.1.6:
dependencies:
@@ -4145,11 +4153,11 @@ snapshots:
postcss-value-parser@4.2.0: {}
- postcss@8.5.32:
+ postcss@8.5.34:
dependencies:
nanoid: 3.3.20
picocolors: 1.1.1
- source-map-js: 1.2.2
+ source-map-js: 1.3.0
prelude-ls@1.2.1: {}
@@ -4196,9 +4204,9 @@ snapshots:
rxjs@7.8.2:
dependencies:
- tslib: 2.8.1
+ tslib: 2.9.1
- sass@1.107.1:
+ sass@1.108.2:
dependencies:
chokidar: 5.0.0
immutable: 5.1.9
@@ -4210,7 +4218,7 @@ snapshots:
semver@7.8.5: {}
- sharp@0.35.5(@types/node@26.6.6):
+ sharp@0.35.5(@types/node@26.6.11):
dependencies:
'@img/colour': 1.1.0
detect-libc: 2.1.2
@@ -4241,7 +4249,7 @@ snapshots:
'@img/sharp-win32-arm64': 0.35.5
'@img/sharp-win32-ia32': 0.35.5
'@img/sharp-win32-x64': 0.35.5
- '@types/node': 26.6.6
+ '@types/node': 26.6.11
shebang-command@2.0.0:
dependencies:
@@ -4272,10 +4280,12 @@ snapshots:
snake-case@3.0.4:
dependencies:
dot-case: 3.0.4
- tslib: 2.8.1
+ tslib: 2.9.1
source-map-js@1.2.2: {}
+ source-map-js@1.3.0: {}
+
string-width@4.2.3:
dependencies:
emoji-regex: 8.0.0
@@ -4301,26 +4311,26 @@ snapshots:
dependencies:
ansi-regex: 6.3.0
- stylelint-config-recommended-scss@17.0.1(postcss@8.5.32)(stylelint@17.5.0(typescript@5.9.3)):
+ stylelint-config-recommended-scss@17.0.1(postcss@8.5.34)(stylelint@17.5.0(typescript@5.9.3)):
dependencies:
- postcss-scss: 4.0.9(postcss@8.5.32)
+ postcss-scss: 4.0.9(postcss@8.5.34)
stylelint: 17.5.0(typescript@5.9.3)
stylelint-config-recommended: 18.0.0(stylelint@17.5.0(typescript@5.9.3))
stylelint-scss: 7.4.0(stylelint@17.5.0(typescript@5.9.3))
optionalDependencies:
- postcss: 8.5.32
+ postcss: 8.5.34
stylelint-config-recommended@18.0.0(stylelint@17.5.0(typescript@5.9.3)):
dependencies:
stylelint: 17.5.0(typescript@5.9.3)
- stylelint-config-standard-scss@17.0.0(postcss@8.5.32)(stylelint@17.5.0(typescript@5.9.3)):
+ stylelint-config-standard-scss@17.0.0(postcss@8.5.34)(stylelint@17.5.0(typescript@5.9.3)):
dependencies:
stylelint: 17.5.0(typescript@5.9.3)
- stylelint-config-recommended-scss: 17.0.1(postcss@8.5.32)(stylelint@17.5.0(typescript@5.9.3))
+ stylelint-config-recommended-scss: 17.0.1(postcss@8.5.34)(stylelint@17.5.0(typescript@5.9.3))
stylelint-config-standard: 40.0.0(stylelint@17.5.0(typescript@5.9.3))
optionalDependencies:
- postcss: 8.5.32
+ postcss: 8.5.34
stylelint-config-standard@40.0.0(stylelint@17.5.0(typescript@5.9.3)):
dependencies:
@@ -4372,8 +4382,8 @@ snapshots:
micromatch: 4.0.8
normalize-path: 3.0.0
picocolors: 1.1.1
- postcss: 8.5.32
- postcss-safe-parser: 7.0.1(postcss@8.5.32)
+ postcss: 8.5.34
+ postcss-safe-parser: 7.0.1(postcss@8.5.34)
postcss-selector-parser: 7.1.6
postcss-value-parser: 4.2.0
string-width: 8.3.0
@@ -4387,6 +4397,8 @@ snapshots:
supports-color@10.2.2: {}
+ supports-color@11.0.0: {}
+
supports-hyperlinks@4.4.0:
dependencies:
has-flag: 5.0.1
@@ -4419,7 +4431,8 @@ snapshots:
dependencies:
typescript: 5.9.3
- tslib@2.8.1: {}
+ tslib@2.8.1:
+ optional: true
tslib@2.9.1: {}
@@ -4545,12 +4558,12 @@ snapshots:
yargs-parser@22.0.0: {}
- yargs@18.0.0:
+ yargs@18.2.0:
dependencies:
cliui: 9.0.1
escalade: 3.2.0
get-caller-file: 2.0.5
- string-width: 7.2.0
+ string-width: 8.3.0
y18n: 5.0.8
yargs-parser: 22.0.0
diff --git a/spec/system/feature_screenshots_spec.rb b/spec/system/feature_screenshots_spec.rb
index 5477f550..f7f8280f 100644
--- a/spec/system/feature_screenshots_spec.rb
+++ b/spec/system/feature_screenshots_spec.rb
@@ -266,8 +266,16 @@ def fab_mod_note_notification(user:, topic:, kind: "note", reply_id: nil, excerp
visit("/")
expect(page).to have_css(".d-header", wait: 15)
find(".header-dropdown-toggle.current-user button", match: :first).click
+ expect(page).to have_no_css(".user-menu .spinner")
expect(page).to have_css(".notification.custom", wait: 10)
- find(".notification.custom a", match: :first).click
+ attempts = 0
+ begin
+ find(".notification.custom a", match: :first).click
+ rescue StandardError => e
+ raise unless e.message.include?("not attached") && (attempts += 1) <= 3
+ sleep 0.1
+ retry
+ end
expect(page).to have_css("#mod-private-note-reply-#{reply_id}", wait: 15)
# Give the deferred scrollIntoView (~250ms) plus rendering settle time.
diff --git a/spec/system/jtech_theme_part2_spec.rb b/spec/system/jtech_theme_part2_spec.rb
index f06da7f0..bc1dbd02 100644
--- a/spec/system/jtech_theme_part2_spec.rb
+++ b/spec/system/jtech_theme_part2_spec.rb
@@ -969,7 +969,7 @@
# edge and is cut off on the left, but its fade still ran left to right as
# in English: the cut-off edge stayed hard and the start faded instead
it "fades the cut-off edge of a strip of tabs in a right-to-left interface" do
- SiteSetting.allow_user_locale = true
+ SiteSetting.allowed_user_locales = "all"
SiteSetting.reqpm_enabled = true
member.update!(locale: "he")
sign_in(member)
diff --git a/spec/system/jtech_theme_part3_spec.rb b/spec/system/jtech_theme_part3_spec.rb
index 6013acf5..b6ced208 100644
--- a/spec/system/jtech_theme_part3_spec.rb
+++ b/spec/system/jtech_theme_part3_spec.rb
@@ -844,7 +844,7 @@
# search field's left: 50% into right: 50% but kept its -50% shift, which put
# the field 330px off centre, over the header's buttons
it "centres the header's search field in a right-to-left interface" do
- SiteSetting.allow_user_locale = true
+ SiteSetting.allowed_user_locales = "all"
member.update!(locale: "he")
sign_in(member)
visit("/latest")
diff --git a/spec/system/jtech_theme_part4_spec.rb b/spec/system/jtech_theme_part4_spec.rb
index 0ca0c308..85bd1fdd 100644
--- a/spec/system/jtech_theme_part4_spec.rb
+++ b/spec/system/jtech_theme_part4_spec.rb
@@ -967,7 +967,7 @@ def gate(categories: "", tags: "")
end
describe "the sidebar's palette menu" do
- let(:background) { "getComputedStyle(document.body).backgroundColor" }
+ let(:body_background) { "getComputedStyle(document.body).backgroundColor" }
def scheme_id(name)
jtech_theme.color_schemes.find_by(name: name).id
@@ -984,7 +984,9 @@ def pick(name)
expect(page).to have_css(".jt-card")
pick("Nord")
- try_until_success { expect(page.evaluate_script(background)).to eq("rgb(236, 239, 244)") }
+ try_until_success do
+ expect(page.evaluate_script(body_background)).to eq("rgb(236, 239, 244)")
+ end
try_until_success do
expect(member.user_option.reload.color_scheme_id).to eq(scheme_id("Nord Light"))
end
@@ -993,14 +995,16 @@ def pick(name)
visit("/latest")
expect(page).to have_css(".jt-card")
- expect(page.evaluate_script(background)).to eq("rgb(236, 239, 244)")
+ expect(page.evaluate_script(body_background)).to eq("rgb(236, 239, 244)")
find(".jt-palette-menu").click
expect(page).to have_css(".jt-palettes__option[aria-checked='true']", exact_text: "Nord")
shot("palette-menu")
# back to black and white: saved as the theme's default
find(".jt-palettes__option", exact_text: "JTech").click
- try_until_success { expect(page.evaluate_script(background)).to eq("rgb(255, 255, 255)") }
+ try_until_success do
+ expect(page.evaluate_script(body_background)).to eq("rgb(255, 255, 255)")
+ end
try_until_success { expect(member.user_option.reload.color_scheme_id).to eq(-1) }
expect(member.user_option.dark_scheme_id).to eq(-1)
expect_no_theme_errors
@@ -1011,10 +1015,12 @@ def pick(name)
expect(page).to have_css(".jt-card")
pick("Gruvbox")
- try_until_success { expect(page.evaluate_script(background)).to eq("rgb(251, 241, 199)") }
+ try_until_success do
+ expect(page.evaluate_script(body_background)).to eq("rgb(251, 241, 199)")
+ end
visit("/latest")
expect(page).to have_css(".jt-card")
- expect(page.evaluate_script(background)).to eq("rgb(251, 241, 199)")
+ expect(page.evaluate_script(body_background)).to eq("rgb(251, 241, 199)")
expect(page).to have_no_css("html.jt-vanilla")
@@ -1022,7 +1028,9 @@ def pick(name)
# to swap the icons
pick("Discourse")
expect(page).to have_css("html.jt-vanilla")
- try_until_success { expect(page.evaluate_script(background)).to eq("rgb(255, 255, 255)") }
+ try_until_success do
+ expect(page.evaluate_script(body_background)).to eq("rgb(255, 255, 255)")
+ end
visit("/latest")
expect(page).to have_css("html.jt-vanilla")
expect(page).to have_no_css(".sidebar-section-link-prefix .d-icon use[href^='#jt-']")
diff --git a/spec/system/reqpm_spec.rb b/spec/system/reqpm_spec.rb
index 93ac840a..3e556bf7 100644
--- a/spec/system/reqpm_spec.rb
+++ b/spec/system/reqpm_spec.rb
@@ -174,10 +174,18 @@ def add_method(user, kind, value, **attrs)
sign_in(alice)
visit "/latest"
find(".header-dropdown-toggle.current-user").click
- item = find(".user-menu .notification", text: "wants your contact details")
- expect(item).to have_content("bob_m")
+ expect(page).to have_no_css(".user-menu .spinner")
+ expect(page).to have_css(".user-menu .notification", text: "wants your contact details")
+ expect(page).to have_css(".user-menu .notification", text: "bob_m")
shot("15_bell_notification")
- item.click
+ attempts = 0
+ begin
+ find(".user-menu .notification", text: "wants your contact details").click
+ rescue StandardError => e
+ raise unless e.message.include?("not attached") && (attempts += 1) <= 3
+ sleep 0.1
+ retry
+ end
expect(page).to have_current_path(%r{/reqpm\?tab=requests})
expect(page).to have_css(".reqpm-row--incoming", text: "bob_m")
end
diff --git a/spec/system/review_queue_click_through_spec.rb b/spec/system/review_queue_click_through_spec.rb
index b8e034f2..c0aba7ea 100644
--- a/spec/system/review_queue_click_through_spec.rb
+++ b/spec/system/review_queue_click_through_spec.rb
@@ -70,11 +70,19 @@ def seed_notification(kind:)
# Capture the bell dropdown with the notification visible.
find(".header-dropdown-toggle.current-user button", match: :first).click
+ expect(page).to have_no_css(".user-menu .spinner")
expect(page).to have_css(".notification.custom", wait: 15)
shot("review_clickthrough_#{kind}_01_bell_dropdown")
- # Click the notification.
- find(".notification.custom a", match: :first).click
+ # Click the notification (re-find if the menu re-renders mid-click).
+ attempts = 0
+ begin
+ find(".notification.custom a", match: :first).click
+ rescue StandardError => e
+ raise unless e.message.include?("not attached") && (attempts += 1) <= 3
+ sleep 0.1
+ retry
+ end
# Verify the URL — Discourse's review queue uses /review or
# /review?reviewable_id=:id depending on version; assert the
diff --git a/themes/jtech/assets/icons-sprite.svg b/themes/jtech/assets/icons-sprite.svg
index 80cccf4f..8a567fe4 100644
--- a/themes/jtech/assets/icons-sprite.svg
+++ b/themes/jtech/assets/icons-sprite.svg
@@ -46,7 +46,7 @@
-
+
@@ -118,7 +118,7 @@
-
+
diff --git a/themes/jtech/stylesheets/jt-panels.scss b/themes/jtech/stylesheets/jt-panels.scss
index 1816e4fa..1d8311ab 100644
--- a/themes/jtech/stylesheets/jt-panels.scss
+++ b/themes/jtech/stylesheets/jt-panels.scss
@@ -35,9 +35,13 @@
padding-top: 2.75rem;
}
-// jtech-tools' REQ-PM is a btn-small; on the card it sits under Message and
-// Follow, which core sizes from 1rem, so it came out a size smaller and 8px
-// shorter. It takes their text size and padding.
+// jtech-tools' REQ-PM is a btn-small; on the card it sits beside core's
+// icon-only controls, which are square at --usercard-button-width (2.3em + 2px).
+// Match their font size and give every control button the same height.
+.user-card .usercard-controls .btn {
+ min-height: var(--usercard-button-width, 2.3em);
+}
+
.user-card .usercard-controls .reqpm-user-button.btn {
padding: 0.5em 0.65em;
font-size: var(--font-0);
diff --git a/themes/jtech/stylesheets/jt-search.scss b/themes/jtech/stylesheets/jt-search.scss
index 325211a3..b8454206 100644
--- a/themes/jtech/stylesheets/jt-search.scss
+++ b/themes/jtech/stylesheets/jt-search.scss
@@ -209,6 +209,10 @@ $jt-search-glyph: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'
display: flex;
flex-direction: column;
+ > [aria-live]:has(> .result-count) {
+ order: -1;
+ }
+
.result-count {
order: -1;
display: flex;
From d534487b7330575a37f7260aaa5bde224c4b57ef Mon Sep 17 00:00:00 2001
From: TripleU <182648541+TripleU613@users.noreply.github.com>
Date: Fri, 4 Dec 2026 13:07:25 -0500
Subject: [PATCH 2/3] Member subdomains: sidebar link, footer link, and
primary-domain-only display option
Add a sidebar link (More -> Subdomains) and JTech theme footer link when member_subdomains_enabled is on, plus a member_subdomains_only_show_primary_domain setting so sites can mirror DNS across multiple domains while only displaying the primary domain in the UI and API.
---
.../subdomains_controller.rb | 6 +-
.../initializers/member-subdomains.ts | 77 +++++++++++++++++++
config/locales/client.en.yml | 9 ++-
config/locales/server.en.yml | 4 +
config/settings.yml | 5 ++
.../member_subdomains_controller_spec.rb | 25 ++++++
sub_plugins/member_subdomains.rb | 6 ++
.../discourse/components/jt-footer.gts | 26 +++++++
8 files changed, 152 insertions(+), 6 deletions(-)
create mode 100644 assets/javascripts/discourse/initializers/member-subdomains.ts
diff --git a/app/controllers/discourse_member_subdomains/subdomains_controller.rb b/app/controllers/discourse_member_subdomains/subdomains_controller.rb
index 0e84fc30..1bcf2b57 100644
--- a/app/controllers/discourse_member_subdomains/subdomains_controller.rb
+++ b/app/controllers/discourse_member_subdomains/subdomains_controller.rb
@@ -17,7 +17,7 @@ def index
raise Discourse::InvalidAccess.new("Subdomains are currently restricted to staff")
end
- domains = DiscourseMemberSubdomains.domains
+ domains = DiscourseMemberSubdomains.visible_domains
eligible = DiscourseMemberSubdomains.allowed?(current_user)
mine =
Subdomain.where(user_id: current_user.id).order(:label).map { |s| serialize(s, domains) }
@@ -55,7 +55,7 @@ def create
)
render_json_dump(
- { subdomain: serialize(subdomain, DiscourseMemberSubdomains.domains) },
+ { subdomain: serialize(subdomain, DiscourseMemberSubdomains.visible_domains) },
status: 201,
)
rescue ValidationError => e
@@ -75,7 +75,7 @@ def update
target: params[:target],
)
- render_json_dump(subdomain: serialize(subdomain, DiscourseMemberSubdomains.domains))
+ render_json_dump(subdomain: serialize(subdomain, DiscourseMemberSubdomains.visible_domains))
rescue ValidationError => e
render_json_error(e.message, status: 422)
rescue ProviderError => e
diff --git a/assets/javascripts/discourse/initializers/member-subdomains.ts b/assets/javascripts/discourse/initializers/member-subdomains.ts
new file mode 100644
index 00000000..f32cb7fb
--- /dev/null
+++ b/assets/javascripts/discourse/initializers/member-subdomains.ts
@@ -0,0 +1,77 @@
+import type Owner from "@ember/owner";
+import { withPluginApi } from "discourse/lib/plugin-api";
+import type BaseCommunitySectionLink from "discourse/lib/sidebar/base-community-section-link";
+import { i18n } from "discourse-i18n";
+
+interface SubdomainsSiteSettings {
+ jtech_enabled?: boolean;
+ member_subdomains_enabled?: boolean;
+ member_subdomains_staff_only?: boolean;
+ member_subdomains_min_trust_level?: number;
+}
+
+interface SubdomainsUser {
+ staff?: boolean;
+ trust_level?: number;
+}
+
+export default {
+ name: "jtech-member-subdomains",
+
+ initialize(container: Owner) {
+ const siteSettings = container.lookup(
+ "service:site-settings"
+ ) as SubdomainsSiteSettings;
+ if (
+ !siteSettings.jtech_enabled ||
+ !siteSettings.member_subdomains_enabled
+ ) {
+ return;
+ }
+
+ const currentUser = container.lookup(
+ "service:current-user"
+ ) as SubdomainsUser | null;
+ if (!currentUser) {
+ return;
+ }
+
+ if (siteSettings.member_subdomains_staff_only && !currentUser.staff) {
+ return;
+ }
+
+ const minTl = siteSettings.member_subdomains_min_trust_level ?? 1;
+ if (!currentUser.staff && (currentUser.trust_level ?? 0) < minTl) {
+ return;
+ }
+
+ withPluginApi((api) => {
+ api.addCommunitySectionLink(
+ (BaseSectionLink: typeof BaseCommunitySectionLink) => {
+ return class MemberSubdomainsSectionLink extends BaseSectionLink {
+ get name() {
+ return "member-subdomains";
+ }
+
+ get route() {
+ return "member-subdomains";
+ }
+
+ get title() {
+ return i18n("member_subdomains.sidebar.title");
+ }
+
+ get text() {
+ return i18n("member_subdomains.sidebar.text");
+ }
+
+ get defaultPrefixValue() {
+ return "globe";
+ }
+ };
+ },
+ true
+ );
+ });
+ },
+};
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 475a688f..469aeff4 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -628,11 +628,14 @@ en:
member_subdomains:
title: Subdomains
heading: Member subdomains
+ sidebar:
+ text: Subdomains
+ title: Member subdomains
staff_only_notice: Staff-only test mode is on.
not_configured: No domains are configured yet.
ineligible: "You need trust level %{min_trust_level} to claim a subdomain."
limit_reached: "You have reached the limit of %{max} subdomain(s)."
- domains_label: Mirrored on
+ domains_label: Domain
claim_heading: Claim a subdomain
label: Subdomain
label_placeholder: yourname
@@ -647,8 +650,8 @@ en:
edit: Edit
delete: Delete
revoke: Revoke
- delete_confirm: "Delete %{label} from all domains?"
- revoke_confirm: "Revoke %{label} (owned by @%{username}) from all domains?"
+ delete_confirm: "Delete %{label}?"
+ revoke_confirm: "Revoke %{label} (owned by @%{username})?"
your_subdomains: Your subdomains
empty: You have not claimed any subdomains yet.
staff_heading: All member subdomains
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index a6163fe8..221de472 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -262,6 +262,10 @@ en:
member_subdomains_revoke_on_suspend: Automatically delete a member's DNS
records when their account is suspended or silenced.
+ member_subdomains_only_show_primary_domain: Only display the first domain
+ from member_subdomains_domains in the /subdomains UI and API while still
+ mirroring DNS records across every configured domain.
+
jtech_lean_palettes: Send the colour palettes in every page with only the
colours their previews and swatches use (primary, secondary, tertiary,
selected, header background and header text) instead of all of them.
diff --git a/config/settings.yml b/config/settings.yml
index b129efe4..8a09f7bd 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -1992,3 +1992,8 @@ jtech_discord_chat:
client: false
depends_on:
- "member_subdomains_enabled"
+ member_subdomains_only_show_primary_domain:
+ default: false
+ client: false
+ depends_on:
+ - "member_subdomains_enabled"
diff --git a/spec/requests/member_subdomains_controller_spec.rb b/spec/requests/member_subdomains_controller_spec.rb
index de98ad36..d6b2212b 100644
--- a/spec/requests/member_subdomains_controller_spec.rb
+++ b/spec/requests/member_subdomains_controller_spec.rb
@@ -206,6 +206,31 @@ def stub_cf_delete(zone_id, record_id)
expect(rollback).to have_been_requested
expect(DiscourseMemberSubdomains::Subdomain.count).to eq(0)
end
+
+ it "shows only the primary domain when only_show_primary_domain is enabled while still mirroring to all domains" do
+ SiteSetting.member_subdomains_only_show_primary_domain = true
+ c1 = stub_cf_create("z1", "r1")
+ c2 = stub_cf_create("z2", "r2")
+ c3 = stub_cf_create("z3", "r3")
+
+ sign_in(tl1_user)
+ post "/jtech-subdomains.json",
+ params: {
+ label: "alice",
+ record_type: "A",
+ target: "93.184.216.34",
+ }
+ expect(response.status).to eq(201)
+ expect(c1).to have_been_requested
+ expect(c2).to have_been_requested
+ expect(c3).to have_been_requested
+ expect(response.parsed_body.dig("subdomain", "fqdns")).to eq(["alice.one.example"])
+
+ get "/jtech-subdomains.json"
+ expect(response.status).to eq(200)
+ expect(response.parsed_body["domains"]).to eq(["one.example"])
+ expect(response.parsed_body["subdomains"].first["fqdns"]).to eq(["alice.one.example"])
+ end
end
describe "revocation on suspend" do
diff --git a/sub_plugins/member_subdomains.rb b/sub_plugins/member_subdomains.rb
index f204bc55..b94b15ff 100644
--- a/sub_plugins/member_subdomains.rb
+++ b/sub_plugins/member_subdomains.rb
@@ -6,6 +6,7 @@
# eligibility live in Site Settings.
register_asset "stylesheets/member-subdomains.scss"
+register_svg_icon "globe"
module ::DiscourseMemberSubdomains
LOG_TAG = "[jtech-tools member-subdomains]"
@@ -38,6 +39,11 @@ def self.domains
end
end
+ def self.visible_domains
+ all = domains
+ SiteSetting.member_subdomains_only_show_primary_domain ? all.first(1) : all
+ end
+
def self.configured?
return false unless enabled?
return false if domains.empty?
diff --git a/themes/jtech/javascripts/discourse/components/jt-footer.gts b/themes/jtech/javascripts/discourse/components/jt-footer.gts
index 8bbf4711..822a7840 100644
--- a/themes/jtech/javascripts/discourse/components/jt-footer.gts
+++ b/themes/jtech/javascripts/discourse/components/jt-footer.gts
@@ -28,10 +28,14 @@ interface JtFooterSignature {
interface FooterUser {
username: string;
+ staff?: boolean;
}
interface FooterSiteSettings {
allow_new_registrations: boolean;
+ jtech_enabled?: boolean;
+ member_subdomains_enabled?: boolean;
+ member_subdomains_staff_only?: boolean;
}
// Site footer: mark + tagline, link columns grouped by `section` (in the order
@@ -56,6 +60,28 @@ export default class JtFooter extends Component {
});
}
const columns = [...bySection].map(([title, links]) => ({ title, links }));
+ if (
+ this.siteSettings.jtech_enabled &&
+ this.siteSettings.member_subdomains_enabled &&
+ (!this.siteSettings.member_subdomains_staff_only ||
+ this.currentUser?.staff)
+ ) {
+ const hasSubdomains = columns.some((c) =>
+ c.links.some((l) => l.url === "/subdomains")
+ );
+ if (!hasSubdomains) {
+ const community =
+ columns.find((c) => /^community$/i.test(c.title)) ?? columns[0];
+ if (community) {
+ community.links.push({
+ section: community.title,
+ title: i18n("member_subdomains.title"),
+ url: getURL("/subdomains"),
+ fullPage: false,
+ });
+ }
+ }
+ }
const legal = columns.findIndex((c) => /^legal$/i.test(c.title));
columns.splice(legal === -1 ? columns.length : legal, 0, this.account);
return columns;
From efa6ec5a9c28656a2e551dea03d9abee8242b3ca Mon Sep 17 00:00:00 2001
From: TripleU <182648541+TripleU613@users.noreply.github.com>
Date: Fri, 4 Dec 2026 13:19:22 -0500
Subject: [PATCH 3/3] Member subdomains: optional Discourse AI safety review
When Discourse AI is enabled with an LLM configured, screen non-staff subdomain requests for obvious profanity, scams, or phishing impersonation before creating or updating DNS records. Fails open on LLM errors so legitimate users are never blocked.
---
.../subdomains_controller.rb | 1 +
config/locales/server.en.yml | 9 ++
config/settings.yml | 11 ++
.../ai_reviewer.rb | 97 ++++++++++++++++
lib/discourse_member_subdomains/manager.rb | 15 +++
.../ai_reviewer_spec.rb | 106 ++++++++++++++++++
sub_plugins/member_subdomains.rb | 1 +
7 files changed, 240 insertions(+)
create mode 100644 lib/discourse_member_subdomains/ai_reviewer.rb
create mode 100644 spec/lib/discourse_member_subdomains/ai_reviewer_spec.rb
diff --git a/app/controllers/discourse_member_subdomains/subdomains_controller.rb b/app/controllers/discourse_member_subdomains/subdomains_controller.rb
index 1bcf2b57..82cd3dcf 100644
--- a/app/controllers/discourse_member_subdomains/subdomains_controller.rb
+++ b/app/controllers/discourse_member_subdomains/subdomains_controller.rb
@@ -73,6 +73,7 @@ def update
subdomain: subdomain,
record_type: params[:record_type],
target: params[:target],
+ user: current_user,
)
render_json_dump(subdomain: serialize(subdomain, DiscourseMemberSubdomains.visible_domains))
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 221de472..fadc34bf 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -266,6 +266,15 @@ en:
from member_subdomains_domains in the /subdomains UI and API while still
mirroring DNS records across every configured domain.
+ member_subdomains_ai_review_enabled: When the Discourse AI plugin is
+ enabled with an LLM configured, screen non-staff subdomain requests for
+ obvious scams, phishing impersonation, or profanity before creating DNS
+ records. Fails open if the LLM is unavailable.
+
+ member_subdomains_ai_llm_model_id: Optional Discourse AI LLM model ID to
+ use for subdomain safety review. Leave at 0 to use the site's default LLM
+ model automatically.
+
jtech_lean_palettes: Send the colour palettes in every page with only the
colours their previews and swatches use (primary, secondary, tertiary,
selected, header background and header text) instead of all of them.
diff --git a/config/settings.yml b/config/settings.yml
index 8a09f7bd..defe6b3b 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -1997,3 +1997,14 @@ jtech_discord_chat:
client: false
depends_on:
- "member_subdomains_enabled"
+ member_subdomains_ai_review_enabled:
+ default: true
+ client: false
+ depends_on:
+ - "member_subdomains_enabled"
+ member_subdomains_ai_llm_model_id:
+ default: 0
+ min: 0
+ client: false
+ depends_on:
+ - "member_subdomains_enabled"
diff --git a/lib/discourse_member_subdomains/ai_reviewer.rb b/lib/discourse_member_subdomains/ai_reviewer.rb
new file mode 100644
index 00000000..0599b879
--- /dev/null
+++ b/lib/discourse_member_subdomains/ai_reviewer.rb
@@ -0,0 +1,97 @@
+# frozen_string_literal: true
+
+require "json"
+
+module ::DiscourseMemberSubdomains
+ module AiReviewer
+ SYSTEM_PROMPT = <<~PROMPT.strip
+ You review subdomain requests for a community tech forum.
+ Approve almost all normal personal names, handles, project names, hobbies, tech tools, and ordinary websites.
+ ONLY reject if the subdomain label or target is clearly:
+ 1. Profanity, slurs, hate speech, or sexually explicit / NSFW wording.
+ 2. Impersonating an official service, bank, login page, government agency, or well-known brand for phishing or scams (for example: paypal-login, apple-verify, bankofamerica, official-support).
+ 3. Obviously pointing to a known scam, phishing, malware, or adult domain.
+
+ Do NOT be paranoid: creative handles, tech/dev/modding terms, personal sites, GitHub Pages, Vercel, Cloudflare Pages, or normal IP addresses are all ALLOWED.
+
+ Respond with ONLY valid JSON: {"allowed": true} or {"allowed": false, "reason": "short plain reason"}.
+ PROMPT
+
+ def self.available?
+ return false unless SiteSetting.member_subdomains_ai_review_enabled
+ return false unless defined?(::DiscourseAi::Completions::Llm) && defined?(::LlmModel)
+ unless SiteSetting.respond_to?(:discourse_ai_enabled) && SiteSetting.discourse_ai_enabled
+ return false
+ end
+
+ llm_model.present?
+ end
+
+ def self.llm_model
+ return nil unless defined?(::LlmModel)
+
+ configured_id = SiteSetting.member_subdomains_ai_llm_model_id.to_i
+ if configured_id > 0
+ ::LlmModel.find_by(id: configured_id)
+ else
+ default_id =
+ SiteSetting.respond_to?(:ai_default_llm_model) ? SiteSetting.ai_default_llm_model.to_i : 0
+ (default_id > 0 && ::LlmModel.find_by(id: default_id)) || ::LlmModel.order(:id).first
+ end
+ end
+
+ def self.check!(user:, label:, record_type:, target:)
+ return :skipped if user&.staff?
+ return :skipped unless available?
+
+ model = llm_model
+ return :skipped unless model
+
+ prompt =
+ ::DiscourseAi::Completions::Prompt.new(
+ SYSTEM_PROMPT,
+ messages: [
+ {
+ type: :user,
+ content:
+ "Subdomain label: #{label}\nRecord type: #{record_type}\nTarget: #{target}\nForum host: #{Discourse.current_hostname}",
+ },
+ ],
+ )
+
+ raw =
+ ::DiscourseAi::Completions::Llm.proxy(model).generate(
+ prompt,
+ user: user || Discourse.system_user,
+ temperature: 0,
+ max_tokens: 120,
+ feature_name: "member_subdomains_review",
+ )
+
+ verdict = parse_verdict(raw)
+ return :allowed if verdict.nil? || verdict["allowed"] != false
+
+ reason = verdict["reason"].to_s.strip.presence || "Not allowed by safety review."
+ raise ValidationError, "Subdomain rejected: #{reason}"
+ rescue ValidationError
+ raise
+ rescue StandardError => e
+ # Fail open so an upstream LLM outage never blocks legitimate members.
+ Rails.logger.warn("#{LOG_TAG} AI review skipped due to error: #{e.class}: #{e.message}")
+ :skipped
+ end
+
+ def self.parse_verdict(raw)
+ text = raw.to_s.strip
+ return nil if text.empty?
+
+ json_str = text[/\{.*\}/m]
+ return nil unless json_str
+
+ parsed = JSON.parse(json_str)
+ parsed.is_a?(Hash) ? parsed : nil
+ rescue JSON::ParserError
+ nil
+ end
+ end
+end
diff --git a/lib/discourse_member_subdomains/manager.rb b/lib/discourse_member_subdomains/manager.rb
index fa28048d..2627743a 100644
--- a/lib/discourse_member_subdomains/manager.rb
+++ b/lib/discourse_member_subdomains/manager.rb
@@ -27,6 +27,13 @@ def self.create!(
raise ValidationError, "That subdomain is already taken."
end
+ AiReviewer.check!(
+ user: user,
+ label: clean_label,
+ record_type: clean_type,
+ target: clean_target,
+ )
+
domains = DiscourseMemberSubdomains.domains
created = {}
@@ -63,6 +70,7 @@ def self.update!(
subdomain:,
record_type:,
target:,
+ user: subdomain.user,
provider: DiscourseMemberSubdomains.provider
)
ensure_configured!
@@ -71,6 +79,13 @@ def self.update!(
clean_target =
Validator.validate_target!(clean_type, Validator.normalize_target(clean_type, target))
+ AiReviewer.check!(
+ user: user,
+ label: subdomain.label,
+ record_type: clean_type,
+ target: clean_target,
+ )
+
domains = DiscourseMemberSubdomains.domains
records = (subdomain.provider_records || {}).dup
diff --git a/spec/lib/discourse_member_subdomains/ai_reviewer_spec.rb b/spec/lib/discourse_member_subdomains/ai_reviewer_spec.rb
new file mode 100644
index 00000000..a671b1ea
--- /dev/null
+++ b/spec/lib/discourse_member_subdomains/ai_reviewer_spec.rb
@@ -0,0 +1,106 @@
+# frozen_string_literal: true
+
+require "rails_helper"
+
+RSpec.describe DiscourseMemberSubdomains::AiReviewer do
+ fab!(:user) { Fabricate(:user, trust_level: TrustLevel[1]) }
+ fab!(:admin)
+
+ before do
+ SiteSetting.jtech_enabled = true
+ SiteSetting.member_subdomains_enabled = true
+ SiteSetting.member_subdomains_ai_review_enabled = true
+ end
+
+ it "skips review for staff" do
+ expect(
+ described_class.check!(
+ user: admin,
+ label: "anything",
+ record_type: "A",
+ target: "93.184.216.34",
+ ),
+ ).to eq(:skipped)
+ end
+
+ it "skips review when disabled" do
+ SiteSetting.member_subdomains_ai_review_enabled = false
+ expect(
+ described_class.check!(
+ user: user,
+ label: "myproject",
+ record_type: "A",
+ target: "93.184.216.34",
+ ),
+ ).to eq(:skipped)
+ end
+
+ describe "with a stubbed LLM" do
+ let(:fake_model) { Object.new }
+ let(:fake_proxy) { instance_double("DiscourseAi::Completions::Llm") }
+
+ before do
+ stub_const("LlmModel", Class.new)
+ stub_const(
+ "DiscourseAi::Completions::Prompt",
+ Class.new do
+ def initialize(*)
+ end
+ end,
+ )
+ stub_const(
+ "DiscourseAi::Completions::Llm",
+ Class.new do
+ def self.proxy(*)
+ end
+ end,
+ )
+ allow(described_class).to receive(:available?).and_return(true)
+ allow(described_class).to receive(:llm_model).and_return(fake_model)
+ allow(DiscourseAi::Completions::Llm).to receive(:proxy).with(fake_model).and_return(
+ fake_proxy,
+ )
+ end
+
+ it "allows clean subdomains" do
+ allow(fake_proxy).to receive(:generate).and_return('{"allowed": true}')
+ expect(
+ described_class.check!(
+ user: user,
+ label: "flipphone-tools",
+ record_type: "CNAME",
+ target: "alice.github.io",
+ ),
+ ).to eq(:allowed)
+ end
+
+ it "rejects clearly abusive or phishing subdomains" do
+ allow(fake_proxy).to receive(:generate).and_return(
+ '{"allowed": false, "reason": "Impersonates a payment login page"}',
+ )
+ expect {
+ described_class.check!(
+ user: user,
+ label: "paypal-login",
+ record_type: "A",
+ target: "93.184.216.34",
+ )
+ }.to raise_error(
+ DiscourseMemberSubdomains::ValidationError,
+ /Impersonates a payment login page/,
+ )
+ end
+
+ it "fails open if the LLM raises an error" do
+ allow(fake_proxy).to receive(:generate).and_raise(StandardError, "timeout")
+ expect(
+ described_class.check!(
+ user: user,
+ label: "myproject",
+ record_type: "A",
+ target: "93.184.216.34",
+ ),
+ ).to eq(:skipped)
+ end
+ end
+end
diff --git a/sub_plugins/member_subdomains.rb b/sub_plugins/member_subdomains.rb
index b94b15ff..7d15c5c1 100644
--- a/sub_plugins/member_subdomains.rb
+++ b/sub_plugins/member_subdomains.rb
@@ -107,6 +107,7 @@ def self.provider
end
require_relative "../lib/discourse_member_subdomains/validator"
+require_relative "../lib/discourse_member_subdomains/ai_reviewer"
require_relative "../lib/discourse_member_subdomains/providers/cloudflare"
require_relative "../lib/discourse_member_subdomains/providers/powerdns"
require_relative "../lib/discourse_member_subdomains/manager"