fix: set tab title to container/app name

Updates the HTML page title to display the app name instead of a
generic 'Textual Web Terminal' title. Resolves TODO item #1.
This commit is contained in:
GitHub Copilot
2026-01-24 10:20:44 +00:00
parent d03f32bf69
commit c873ed2b2e
3 changed files with 5 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
- [ ] Set tab title to the container name
- [ ] screenshots are still showing the tmux bar creeping up and slowly taking over the screenshot
+2 -1
View File
@@ -724,11 +724,12 @@ class LocalServer:
route_key = RouteKey(generate().lower())
ws_url = self._get_ws_url_from_request(request, route_key)
page_title = available_app.name if available_app else "Textual Web Terminal"
html_content = f"""<!DOCTYPE html>
<html>
<head>
<title>Textual Web Terminal</title>
<title>{page_title}</title>
<link rel=\"stylesheet\" href=\"/static/css/xterm.css\">
<link rel=\"stylesheet\" href=\"/static-webterm/monospace.css\">
<script src=\"/static/js/textual.js\"></script>
+1
View File
@@ -494,6 +494,7 @@ class TestLocalServerMoreCoverage:
assert "/static-webterm/monospace.css" in resp.text
assert "data-session-websocket-url" in resp.text
assert "data-font-size" in resp.text
assert "<title>Known</title>" in resp.text
def test_rewrite_svg_fonts_removes_font_face_and_forces_stack(self):
svg = (