Skip to content

Conversation

@NicoTuxx
Copy link
Contributor

@NicoTuxx NicoTuxx commented Dec 3, 2025

Testing the Timeout Modal

To test the scenario where the timeout modal appears but the file eventually loads:

Temporarily make these changes in FileEditor.vue:

  1. Reduce the timeout threshold (around line 445):
const LOADING_TIMEOUT_MS = 3000; // Reduced from 30000 for testing
  1. Add a simulated delay to the onReady event (around line 369):
onReady: (): void => {
  // Simulate slow file loading to trigger timeout modal
  const SIMULATED_DELAY = 5000; // 5 seconds
  window.setTimeout(() => {
    window.electronAPI.log('info', 'CryptPad editor is ready and document loaded successfully');
    fileLoaded.value = true;
  }, SIMULATED_DELAY);
},

Expected behavior:

  1. Open a CryptPad-supported file (e.g., .xlsx, .md)
  2. After 3 seconds, a timeout modal should appear asking if you want to wait or go back
  3. Click "Wait" button
  4. After ~2 more seconds, the file should finish loading
  5. Click "Close" to dismiss the modal and start editing (it should not redirect you)

This tests that the timeout handling properly continues waiting when the user chooses to wait, correctly detects when the file finally loads, and updates the button accordingly.

Remember to remove both testing modifications before committing.

@NicoTuxx NicoTuxx requested a review from a team as a code owner December 3, 2025 16:02
@NicoTuxx NicoTuxx force-pushed the ms-improve-cryptpad-timeout-modal branch 5 times, most recently from 4b39aef to 5899a6f Compare December 3, 2025 17:19
@NicoTuxx NicoTuxx linked an issue Dec 4, 2025 that may be closed by this pull request
2 tasks
@NicoTuxx NicoTuxx force-pushed the ms-improve-cryptpad-timeout-modal branch 2 times, most recently from 22b8339 to 4f73363 Compare December 4, 2025 15:16
@NicoTuxx NicoTuxx force-pushed the ms-improve-cryptpad-timeout-modal branch 2 times, most recently from 959e653 to eca85cb Compare December 4, 2025 16:56
@NicoTuxx NicoTuxx force-pushed the ms-improve-cryptpad-timeout-modal branch from eca85cb to b47c9b1 Compare December 5, 2025 10:16
@mmmarcos mmmarcos added this to the v3.7.1 milestone Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Cryptpad timeout modal

5 participants