Expose norm finder in chat header
This commit is contained in:
@@ -555,7 +555,7 @@ MAX_MESSAGE_LEN = 10_000
|
||||
|
||||
# ⚠️ Версия UI — единый источник. БАМПАТЬ ПРИ КАЖДОМ ДЕПЛОЕ (формат: YYYY-MM-DD + буква).
|
||||
# Фронт берёт её через GET /api/version (chat.html + admin.html, элемент .app-version).
|
||||
APP_VERSION = "2026-12-02e"
|
||||
APP_VERSION = "2026-12-04a"
|
||||
|
||||
# Audit: path → action name mapping
|
||||
_AUDIT_MAP = [
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
[
|
||||
{
|
||||
"version": "2026-12-04a",
|
||||
"date": "2026-12-04",
|
||||
"changes": [
|
||||
"Подбор норм теперь доступен отдельной кнопкой в шапке чата"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2026-12-02e",
|
||||
"date": "2026-12-02",
|
||||
|
||||
+5
-3
@@ -244,8 +244,9 @@ button { font-family: inherit; }
|
||||
#header { background: var(--bg-card); padding: .6rem 1.4rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); }
|
||||
#header h1 { font-size: 1rem; font-weight: 650; color: var(--text); letter-spacing: -.012em; }
|
||||
.header-actions { display: flex; gap: .4rem; }
|
||||
.header-actions button { padding: .38rem .8rem; background: transparent; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: .78rem; color: var(--text-muted); font-weight: 500; transition: all .15s; }
|
||||
.header-actions button:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }
|
||||
.header-actions button, .header-actions .header-link { padding: .38rem .8rem; background: transparent; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: .78rem; color: var(--text-muted); font-weight: 500; transition: all .15s; }
|
||||
.header-actions .header-link { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
|
||||
.header-actions button:hover, .header-actions .header-link:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }
|
||||
.header-actions button:active { transform: translateY(1px); }
|
||||
/* Аккаунт — крайняя правая кнопка: кружок с инициалом и почтой, по нажатию меню с полным
|
||||
адресом и «Выйти». Логин кнопкой среди действий — не дизайн (Хозяин, 21.11.2026). */
|
||||
@@ -521,7 +522,7 @@ button { font-family: inherit; }
|
||||
/* Телефон: значки — первой строкой, кнопки — всегда второй, с прокруткой вбок. */
|
||||
#header > div:first-child { flex: 1 1 100%; }
|
||||
.header-actions { flex: 1 1 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: .3rem; padding: 3px 2px; scroll-padding-inline: 3px; }
|
||||
.header-actions button { white-space: nowrap; flex: 0 0 auto; }
|
||||
.header-actions button, .header-actions .header-link { white-space: nowrap; flex: 0 0 auto; }
|
||||
#messages { padding-left: .7rem; padding-right: .7rem; }
|
||||
.msg { max-width: 92%; }
|
||||
.onboarding { margin: 1.2rem auto; padding: 1rem; }
|
||||
@@ -803,6 +804,7 @@ html { color-scheme: light; }
|
||||
<button id="balance-badge" onclick="openBalancePopover()" aria-haspopup="dialog" title="Сколько осталось на сутки" style="display:none;margin-left:.5rem;padding:3px 11px;border:1px solid var(--border);border-radius:14px;font-size:.78rem;cursor:pointer;white-space:nowrap"></button>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<a class="header-link" href="/podbor">Подбор норм</a>
|
||||
<button id="btn-admin" style="display:none" onclick="location.href='/admin'">Админ</button>
|
||||
<!-- Депрекированы 2026-05-07 (этап 5 — депрекация отдельных страниц).
|
||||
Функционал доступен через чат + hybrid MCP. Endpoints в main.py тоже
|
||||
|
||||
@@ -99,6 +99,17 @@ def test_choice_replaces_current_answer_without_new_bubble(browser, site):
|
||||
assert not state["horizontalOverflow"]
|
||||
|
||||
|
||||
def test_norm_finder_entry_is_visible_after_login_on_desktop_and_phone(browser, site):
|
||||
for width in (1280, 390):
|
||||
page = browser.new_page(viewport={"width": width, "height": 800})
|
||||
page.goto(site)
|
||||
link = page.locator('#chat-screen .header-actions a[href="/podbor"]')
|
||||
link.wait_for(state="visible")
|
||||
assert link.inner_text() == "Подбор норм"
|
||||
assert link.evaluate("el => el.getBoundingClientRect().width > 0")
|
||||
page.close()
|
||||
|
||||
|
||||
def test_saved_revision_reopens_inside_same_bubble(browser, site):
|
||||
page = browser.new_page(viewport={"width": 390, "height": 844})
|
||||
page.goto(site)
|
||||
|
||||
Reference in New Issue
Block a user