Skip to content
Closed
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
2 changes: 1 addition & 1 deletion capsules/chat-room-ui/.chat_room_ui_source.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6654816bf80d5e89d51a00a92dc40d97ffc85ddb114119e5f7888008cc6c58bc
c4bc39f5e21111753a2240562b6d7f9d473033293c294d76456ab2bdff03a837
37 changes: 20 additions & 17 deletions capsules/chat-room-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2888,7 +2888,7 @@ impl App {
direct_mode || !controls.show_conversation_join,
)?;
self.conversation_join_submit
.set_disabled(!controls.enable_gateway_controls);
.set_disabled(!controls.show_conversation_join);
let invite_url = state.join_invite_url.as_deref().unwrap_or_default();
self.conversation_invite_output.set_value(invite_url);
set_hidden(
Expand Down Expand Up @@ -4389,18 +4389,21 @@ mod tests {
assert!(shell_isolated.enable_text_send);
assert!(shell_isolated.show_attach);
assert!(shell_isolated.enable_attach);
assert!(!shell_isolated.show_browser_requests);
assert!(!shell_isolated.show_room_access_toggle);
assert!(!shell_isolated.show_room_access);
assert!(shell_isolated.show_browser_requests);
assert!(shell_isolated.show_room_access_toggle);
assert!(shell_isolated.show_room_access);
assert!(!shell_isolated.show_conversation_join);
assert!(!shell_isolated.enable_gateway_controls);
assert!(shell_isolated.enable_gateway_controls);

let shell_isolated_unjoined = chat_control_policy(true, false, true, false, true, true);
assert!(shell_isolated_unjoined.show_conversation_join);

let gateway_isolated = chat_control_policy(true, false, false, true, true, true);
assert!(gateway_isolated.show_browser_requests);
assert!(gateway_isolated.show_room_access_toggle);
assert!(gateway_isolated.show_room_access);
assert!(!gateway_isolated.show_browser_requests);
assert!(!gateway_isolated.show_room_access_toggle);
assert!(!gateway_isolated.show_room_access);
assert!(!gateway_isolated.show_conversation_join);
assert!(gateway_isolated.enable_gateway_controls);
assert!(!gateway_isolated.enable_gateway_controls);
}

#[test]
Expand All @@ -4418,10 +4421,10 @@ mod tests {
assert!(!configured.show_conversation_join);

let unconfigured_gateway = chat_control_policy(true, false, false, false, false, false);
assert!(unconfigured_gateway.show_conversation_join);
assert!(!unconfigured_gateway.show_conversation_join);

let unconfigured_shell = chat_control_policy(true, false, true, false, false, false);
assert!(!unconfigured_shell.show_conversation_join);
assert!(unconfigured_shell.show_conversation_join);
}

#[test]
Expand Down Expand Up @@ -4868,16 +4871,16 @@ fn chat_control_policy(
show_access_controls: bool,
has_pending_requests: bool,
) -> ChatControlPolicy {
let gateway_surface = room_mode_known && !shell_mode && !configured;
let home_access_surface = room_mode_known && shell_mode && !configured;
ChatControlPolicy {
enable_text_send: session_active,
show_attach: room_mode_known && !configured,
enable_attach: room_mode_known && !configured && session_active,
show_browser_requests: gateway_surface && has_pending_requests,
show_room_access_toggle: gateway_surface && session_active,
show_room_access: gateway_surface && session_active && show_access_controls,
show_conversation_join: gateway_surface && !session_active,
enable_gateway_controls: gateway_surface && session_active,
show_browser_requests: home_access_surface && has_pending_requests,
show_room_access_toggle: home_access_surface && session_active,
show_room_access: home_access_surface && session_active && show_access_controls,
show_conversation_join: home_access_surface && !session_active,
enable_gateway_controls: home_access_surface && session_active,
}
}

Expand Down
12 changes: 6 additions & 6 deletions capsules/chat-room/browser/chat_room_ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,20 @@ export function start() {
wasm.start();
}

function wasm_bindgen__convert__closures_____invoke__h6c882d24848f50e5(arg0, arg1, arg2) {
wasm.wasm_bindgen__convert__closures_____invoke__h6c882d24848f50e5(arg0, arg1, arg2);
}

function wasm_bindgen__convert__closures_____invoke__he5a716c89cafc3f6(arg0, arg1, arg2) {
wasm.wasm_bindgen__convert__closures_____invoke__he5a716c89cafc3f6(arg0, arg1, arg2);
}

function wasm_bindgen__convert__closures_____invoke__h76bc78299e8b98a7(arg0, arg1) {
wasm.wasm_bindgen__convert__closures_____invoke__h76bc78299e8b98a7(arg0, arg1);
}

function wasm_bindgen__convert__closures_____invoke__h31c454d25a03d65b(arg0, arg1) {
wasm.wasm_bindgen__convert__closures_____invoke__h31c454d25a03d65b(arg0, arg1);
}

function wasm_bindgen__convert__closures_____invoke__h76bc78299e8b98a7(arg0, arg1) {
wasm.wasm_bindgen__convert__closures_____invoke__h76bc78299e8b98a7(arg0, arg1);
function wasm_bindgen__convert__closures_____invoke__h6c882d24848f50e5(arg0, arg1, arg2) {
wasm.wasm_bindgen__convert__closures_____invoke__h6c882d24848f50e5(arg0, arg1, arg2);
}

const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
Expand Down
Binary file modified capsules/chat-room/browser/chat_room_ui_bg.wasm
Binary file not shown.
4 changes: 2 additions & 2 deletions capsules/chat-room/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h4>Invite another person</h4>
import {
createHomeClipboardClient,
} from "/apps/home/home-clipboard-client.js?v=home-20260726a";
import init from "./chat_room_ui.js?v=chat-room-ui-20260804a";
import init from "./chat_room_ui.js?v=chat-room-ui-20260929a";

const chatLaunchParams = new URLSearchParams(window.location.search);
const chatHomeToken = new URLSearchParams(window.location.hash.replace(/^#/, "")).get("home_token") || "";
Expand All @@ -158,7 +158,7 @@ <h4>Invite another person</h4>
purpose: "conversation.invite",
});
init({
module_or_path: new URL("./chat_room_ui_bg.wasm?v=chat-room-ui-20260804a", import.meta.url),
module_or_path: new URL("./chat_room_ui_bg.wasm?v=chat-room-ui-20260929a", import.meta.url),
});
</script>
<script>
Expand Down
Loading