<commit_before><div>
<a ng-href="#/film/view/{{filmId}}" ng-if="loaded">Film Details</a>
<a ng-href="#/branch/changes/{{branchId}}" ng-if="branchId != null">Branch History</a>
</div>

<div ng-if="! canReadQuips && loaded">
You do not have permissions to view the contents of this branch.
<div class="bug">BUG this message may be incorrectly shown while the page is loading.</div>
</div>

<div ng-if="canReadQuips" class="component">
    
    <div ng-if="loaded">
        <div><span>{{filmName}}</span> <span>({{filmReleaseYear}})</span>
            <span ng-if="urlChangeId &gt;= 0">(revision {{changeId}})</span>
            <span ng-if="urlChangeId &lt; 0">(pending changes)</span>
        </div>
        <branch-header branch="branchDetails"></branch-header>
        <div>Last updated on {{updatedOn}}</div>
    </div>
    <div ng-if="! loaded">
        <span ng-if="loadError">Problem loading branch.  You may not have
        permission to see it, or it may not exist.</span>
        <span ng-if="! loadError">loading...</span>
    </div>

    <branch-updates current-branch="branchDetails"></branch-updates>
    
    <div ng-if="hasPendingChange">
        You have changes saved on the server that haven't been committed
        to the branch.
        <button ng-click="commitChanges()">Commit Changes</button>
        <span ng-click="abandonChanges()">[ Abandon Changes ]</span>
    </div>
    
    <media-controller
        time="videoTimeProvider"
        controller="mediaAlertController"
        branch-details="branchDetails"></media-controller>
    
    <!-- quips flashing to the screen -->
    <div>
        <!-- FIXME set the style based on the edit state -->
        <div ng-repeat="quip in shownQuips" class="popup_quip">
            <div>
                <span ng-if="isEditable">
                    <span ng-click="editQuip(quip)" ng-if="! speechEntry">&#9998;</span>
                    <span ng-click="deleteQuip(quip)">&#9986;</span>
                    <!-- doesn't actually do anything now.  Besides, should
                    only be shown if there's something to revert.
                    <span ng-click="revertQuip(quip)">&lArr;</span>
                    -->
                </span>
                <span>{{getQuipTime(quip)}}</span>
                <span ng-repeat="tag in quip.tags">
                    {{tag.name}}
                </span>
            </div>
            <div>{{quip.text}}</div>
        </div>
    </div>
    
    
    <!-- Edit the quip -->
    <div ng-if="canEditQuips">
        <div ng-if="speechEntry" style="border:2px solid black; background: #f80;">
            <div ng-if="hasSpeechError">
                <span ng-if="speechError.networkProblem">
                Could not connect to the speech recognition service.
                </span>
                <span ng-if="speechError.blocked">
                The browser is preventing the speech recognition from running.
                You may have blocked it from listening to the microphone, or
                maybe you need to plugged in and turned on your microphone?
                </span>
                <span ng-if="speechError.userDenied">
                You seem to have explicitly denied the page from listening to
                the microphone.  Check your browser settings to re-enable it.
                </span>
            </div>
            <div ng-if="speechListening">
                <div>
                Speak the quip for {{quipTime}}
                <span ng-click="stopSpeechListen()">[ Stop voice entry ]</span>
                </div>
                
                <div>
                <span ng-click="clearVoiceText()">&#10005;</span>
                
                {{heardText}}
                </div>
                
                <div>
                    <button ng-click="saveVoiceCapture()">Save</button>
                    <span ng-click="cancelVoiceCapture()">[ Cancel ]</span>
                </div>
            </div>
            <div ng-if="! speechListening">
                <span ng-click="stopSpeechListen()">[ Stop voice entry ]</span>
                <button ng-click="startVoiceCapture()">Start</button>
            </div>
        </div>
        <div ng-if="! speechEntry">
        Edit quip:
        <button ng-if="hasSpeechSupport"
            ng-click="startSpeechListen()">&#127908; Use your voice</button>
        
        <form onsubmit="return false;">
        <div>
            <label for="quip_time">When </label>
            <input id="quip_time" type="text" ng-model="quipTime">
            <span ng-if="quipTimeEdited && ! hasQuipTimeFormatError">({{parsedQuipTime}})</span>
            <span ng-if="hasQuipTimeFormatError">Invalid time format</span>
        </div>
        <div>
            <label for="quip_text">With </label>
            <input id="quip_text" type="text" ng-model="quipText">
        </div>
        <div>
            <span class="bug">BUG Pressing "enter" sets the pending time.</span>
            <button ng-click="setPendingQuipTime()">Set time to now</button>
            <input type="submit" ng-click="savePendingQuip()" value="Save"
                ng-disabled="hasQuipTimeFormatError">
            <span ng-click="cancelEditQuip()">&#10005;</span>
        </div>
        </form><commit_msg>Change notes on usability with the set pending time on enter<commit_after><div>
<a ng-href="#/film/view/{{filmId}}" ng-if="loaded">Film Details</a>
<a ng-href="#/branch/changes/{{branchId}}" ng-if="branchId != null">Branch History</a>
</div>

<div ng-if="! canReadQuips && loaded">
You do not have permissions to view the contents of this branch.
<div class="bug">BUG this message may be incorrectly shown while the page is loading.</div>
</div>

<div ng-if="canReadQuips" class="component">
    
    <div ng-if="loaded">
        <div><span>{{filmName}}</span> <span>({{filmReleaseYear}})</span>
            <span ng-if="urlChangeId &gt;= 0">(revision {{changeId}})</span>
            <span ng-if="urlChangeId &lt; 0">(pending changes)</span>
        </div>
        <branch-header branch="branchDetails"></branch-header>
        <div>Last updated on {{updatedOn}}</div>
    </div>
    <div ng-if="! loaded">
        <span ng-if="loadError">Problem loading branch.  You may not have
        permission to see it, or it may not exist.</span>
        <span ng-if="! loadError">loading...</span>
    </div>

    <branch-updates current-branch="branchDetails"></branch-updates>
    
    <div ng-if="hasPendingChange">
        You have changes saved on the server that haven't been committed
        to the branch.
        <button ng-click="commitChanges()">Commit Changes</button>
        <span ng-click="abandonChanges()">[ Abandon Changes ]</span>
    </div>
    
    <media-controller
        time="videoTimeProvider"
        controller="mediaAlertController"
        branch-details="branchDetails"></media-controller>
    
    <!-- quips flashing to the screen -->
    <div>
        <!-- FIXME set the style based on the edit state -->
        <div ng-repeat="quip in shownQuips" class="popup_quip">
            <div>
                <span ng-if="isEditable">
                    <span ng-click="editQuip(quip)" ng-if="! speechEntry">&#9998;</span>
                    <span ng-click="deleteQuip(quip)">&#9986;</span>
                    <!-- doesn't actually do anything now.  Besides, should
                    only be shown if there's something to revert.
                    <span ng-click="revertQuip(quip)">&lArr;</span>
                    -->
                </span>
                <span>{{getQuipTime(quip)}}</span>
                <span ng-repeat="tag in quip.tags">
                    {{tag.name}}
                </span>
            </div>
            <div>{{quip.text}}</div>
        </div>
    </div>
    
    
    <!-- Edit the quip -->
    <div ng-if="canEditQuips">
        <div ng-if="speechEntry" style="border:2px solid black; background: #f80;">
            <div ng-if="hasSpeechError">
                <span ng-if="speechError.networkProblem">
                Could not connect to the speech recognition service.
                </span>
                <span ng-if="speechError.blocked">
                The browser is preventing the speech recognition from running.
                You may have blocked it from listening to the microphone, or
                maybe you need to plugged in and turned on your microphone?
                </span>
                <span ng-if="speechError.userDenied">
                You seem to have explicitly denied the page from listening to
                the microphone.  Check your browser settings to re-enable it.
                </span>
            </div>
            <div ng-if="speechListening">
                <div>
                Speak the quip for {{quipTime}}
                <span ng-click="stopSpeechListen()">[ Stop voice entry ]</span>
                </div>
                
                <div>
                <span ng-click="clearVoiceText()">&#10005;</span>
                
                {{heardText}}
                </div>
                
                <div>
                    <button ng-click="saveVoiceCapture()">Save</button>
                    <span ng-click="cancelVoiceCapture()">[ Cancel ]</span>
                </div>
            </div>
            <div ng-if="! speechListening">
                <span ng-click="stopSpeechListen()">[ Stop voice entry ]</span>
                <button ng-click="startVoiceCapture()">Start</button>
            </div>
        </div>
        <div ng-if="! speechEntry">
        Edit quip:
        <button ng-if="hasSpeechSupport"
            ng-click="startSpeechListen()">&#127908; Use your voice</button>
        
        <form onsubmit="return false;">
        <div>
            <label for="quip_time">When </label>
            <input id="quip_time" type="text" ng-model="quipTime">
            <span ng-if="quipTimeEdited && ! hasQuipTimeFormatError">({{parsedQuipTime}})</span>
            <span ng-if="hasQuipTimeFormatError">Invalid time format</span>
        </div>
        <div>
            <label for="quip_text">With </label>
            <input id="quip_text" type="text" ng-model="quipText">
        </div>
        <div>
            <!-- Note: Pressing "enter" sets the pending time.
            This is a feature, not a bug! -->
            <button ng-click="setPendingQuipTime()">Set time to now</button>
            <input type="submit" ng-click="savePendingQuip()" value="Save"
                ng-disabled="hasQuipTimeFormatError">
            <span ng-click="cancelEditQuip()">&#10005;</span>
        </div>
        </form>
{'fraction_non_alphanumeric': 0.14410193947343763, 'fraction_numerical': 0.00543427340016865, 'mean_word_length': 1.863197424892704, 'pattern_counts': {'":': 0, '<': 258, '<?xml version=': 0, '>': 258, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3396978', 'n_tokens_mistral': 3117, 'n_tokens_neox': 2927, 'n_words': 747}